Skip to content

OS Command Injection in gogs

Critical severity GitHub Reviewed Published May 31, 2022 in gogs/gogs • Updated Nov 19, 2024

Package

gomod gogs.io/gogs (Go)

Affected versions

< 0.12.8

Patched versions

0.12.8

Description

Impact

The malicious user is able to upload a crafted config file into repository's .git directory with to gain SSH access to the server. All Windows installations with repository upload enabled (default) are affected.

Patches

Repository file uploads are prohibited to its .git directory. Users should upgrade to 0.12.8 or the latest 0.13.0+dev.

Workarounds

Disable repository files upload.

References

https://www.huntr.dev/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b/

For more information

If you have any questions or comments about this advisory, please post on #6968.

References

@unknwon unknwon published to gogs/gogs May 31, 2022
Published to the GitHub Advisory Database Jun 2, 2022
Reviewed Jun 2, 2022
Published by the National Vulnerability Database Nov 15, 2024
Last updated Nov 19, 2024

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

EPSS score

0.110%
(45th percentile)

CVE ID

CVE-2022-1884

GHSA ID

GHSA-958j-443g-7mm7

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.