GHSA-pfvh-p8qp-9ww9

Suggest an improvement
Source
https://github.com/advisories/GHSA-pfvh-p8qp-9ww9
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/02/GHSA-pfvh-p8qp-9ww9/GHSA-pfvh-p8qp-9ww9.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-pfvh-p8qp-9ww9
Aliases
Published
2023-02-28T20:12:11Z
Modified
2024-08-20T20:59:03.193496Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Gogs OS Command Injection vulnerability
Details

Impact

The malicious user is able to update a crafted config file into repository's .git directory in combination with crafted file deletion to gain SSH access to the server on case-insensitive file systems. All installations with repository upload enabled (default) on case-insensitive file systems (Windows, macOS, etc.) are affected.

Patches

Make sanitization of upload path to .git directory to be case-insensitive. Users should upgrade to 0.12.11 or the latest 0.13.0+dev.

Workarounds

Disable repository upload.

References

https://huntr.dev/bounties/18cf9256-23ab-4098-a769-85f8da130f97/

For more information

If you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/7030.

Database specific
{
    "nvd_published_at": "2023-02-25T08:15:00Z",
    "github_reviewed_at": "2023-02-28T20:12:11Z",
    "severity": "CRITICAL",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-78"
    ]
}
References

Affected packages

Go / gogs.io/gogs

Package

Name
gogs.io/gogs
View open source insights on deps.dev
Purl
pkg:golang/gogs.io/gogs

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.12.11