SB2022053153 - Multiple vulnerabilities in gogs
Published: May 31, 2022 Updated: April 27, 2026
Breakdown by Severity
- 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.
References
- https://github.com/gogs/gogs/security/advisories/GHSA-56j7-2pm8-rgmx
- https://github.com/gogs/gogs/security/advisories/GHSA-958j-443g-7mm7
- https://github.com/gogs/gogs/security/advisories/GHSA-pj96-4jhv-v792
- https://github.com/gogs/gogs/security/advisories/GHSA-w689-557m-2cvq
- https://huntr.dev/bounties/da1fbd6e-7a02-458e-9c2e-6d226c47046d/