CVE-2024-39933: Gogs.io/gogs Gogs Allows Argument Injection When Vulnerability
HIGHCVE-2024-39933 is a HIGH (CVSS 7.7) gogs allows argument injection when vulnerability (CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')) affecting Gogs.io/gogs libraries in the Go ecosystem. The issue involves gogs allows argument injection when tagging new releases. Remediation is available by upgrading affected packages to version 0.13.1.
CVE-2024-39933 at a Glance
Security Impact
CVSS: 7.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AC:L/AV:N/A:N/C:H/I:N/PR:L/S:C/UI:N).
How to Fix CVE-2024-39933
To remediate this vulnerability, upgrade all affected Gogs.io/gogs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade gogs.io/gogs to 0.13.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for gogs.io/gogs
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-39933, inspect your project dependencies for Gogs.io/gogs:
inspect dependencies for gogs.io/gogs
Analyze the terminal output to locate any version of Gogs.io/gogs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.13.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'), where the product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string. In Gogs.io/gogs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-39933 Affected Gogs.io/gogs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gogs.io/gogs
|
Go |
< 0.13.1
|
0.13.1
|
References
Frequently Asked Questions
What is CVE-2024-39933?
Which Gogs.io/gogs versions are affected?
What version fixes CVE-2024-39933?
Is gogs.io/gogs affected?
What is the CVSS score of CVE-2024-39933?
What CWE is associated with CVE-2024-39933?
How can I check Go dependencies for CVE-2024-39933?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m27m-h5gj-wwmg",
"modified" : "2024-12-23T20:38:12Z",
"published" : "2024-12-23T20:38:12Z",
"aliases" : [ "CVE-2024-39933" ],
"summary" : "Gogs allows argument Injection when tagging new releases",
"details" : "### Impact\n\nUnprivileged user accounts with at least one SSH key can read arbitrary files on the system. For instance, they could leak the configuration files that could contain database credentials (`[database] *`) and `[security] SECRET_KEY`. Attackers could also exfiltrate TLS certificates, other users' repositories, and the Gogs database when the SQLite driver is enabled.\n\n### Patches\n\nUnintended Git options has been ignored for creating tags (https://github.com/gogs/gogs/pull/7872). Users should upgrade to 0.13.1 or the latest 0.14.0+dev.\n\n### Workarounds\n\nNo viable workaround available, please only grant access to trusted users to your Gogs instance on affected versions.\n\n### References\n\nhttps://www.cve.org/CVERecord?id=CVE-2024-39933\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AC:L/AV:N/A:N/C:H/I:N/PR:L/S:C/UI:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "gogs.io/gogs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.13.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.13.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/security/advisories/GHSA-m27m-h5gj-wwmg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-39933"
}, {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/pull/7872"
}, {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/commit/76831d0d06c44c5cf46dc22b380440b7507c2f07"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gogs/gogs"
}, {
"type" : "WEB",
"url" : "https://www.sonarsource.com/blog/securing-developer-tools-unpatched-code-vulnerabilities-in-gogs-1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-88" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-23T20:38:12Z",
"nvd_published_at" : null
}
}