SB2022053153 - Multiple vulnerabilities in gogs



SB2022053153 - Multiple vulnerabilities in gogs

Published: May 31, 2022 Updated: April 27, 2026

Security Bulletin ID SB2022053153
CSH Severity
Medium
Patch available
YES
Number of vulnerabilities 4
Exploitation vector Remote access
Highest impact Code execution

Breakdown by Severity

Medium 50% Low 50%
  • Low
  • Medium
  • High
  • Critical

Description

This security bulletin contains information about 4 vulnerabilities.


1) OS Command Injection (CVE-ID: CVE-2021-32546)

The vulnerability allows a remote user to execute arbitrary commands on the server.

The vulnerability exists due to command injection in repository file editing when updating a crafted config file into the repository's .git directory. A remote user can upload or update a specially crafted file to execute arbitrary commands on the server.

Only installations with repository upload enabled are vulnerable.


2) OS Command Injection (CVE-ID: CVE-2022-1884)

The vulnerability allows a remote user to gain SSH access to the server.

The vulnerability exists due to command injection in repository file upload handling when uploading a crafted config file into the repository's .git directory. A remote user can upload a crafted config file to gain SSH access to the server.

Only Windows installations with repository upload enabled are vulnerable.


3) Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) (CVE-ID: N/A)

The vulnerability allows a remote user to execute script in their own web session.

The vulnerability exists due to improper neutralization of script-related html tags in CSRF cookie handling when processing a manipulated CSRF cookie value. A remote user can manipulate the CSRF cookie to execute script in their own web session.

The issue is described as having no known practical impact beyond self-xss.


4) Server-Side Request Forgery (SSRF) (CVE-ID: CVE-2022-1285)

The vulnerability allows a remote user to discover services in the internal network.

The vulnerability exists due to server-side request forgery in webhook functionality when processing user-supplied webhook payload URLs. A remote user can supply a webhook payload URL to probe internal network services to discover services in the internal network.

All installations accepting public traffic are vulnerable.


Remediation

Install update from vendor's website.