CVE-2024-9427: Koji Cross-Site Scripting Vulnerability
MODERATECVE-2024-9427 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Koji libraries in the PyPI ecosystem. The issue involves koji cross-site scripting. Remediation is available by upgrading affected packages to version 1.35.1, 1.34.3, 1.33.2.
CVE-2024-9427 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2024-9427
To remediate this vulnerability, upgrade all affected Koji dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install koji>=1.35.1
pip install koji>=1.34.3
pip install koji>=1.33.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show koji
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-9427, inspect your installed packages using pip:
pip show koji
Analyze the terminal output to locate any version of Koji in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.35.1), your application is affected.
Note: The pip show koji command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Koji, 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-9427 Affected Koji Versions
3 component(s)References
Frequently Asked Questions
What is CVE-2024-9427?
Which Koji versions are affected?
What version fixes CVE-2024-9427?
Is koji affected?
What is the CVSS score of CVE-2024-9427?
What CWE is associated with CVE-2024-9427?
How can I check PyPI dependencies for CVE-2024-9427?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g2vg-8hfg-79vj",
"modified" : "2025-02-07T06:31:13Z",
"published" : "2024-12-24T06:30:42Z",
"aliases" : [ "CVE-2024-9427" ],
"summary" : "Koji Cross-site Scripting",
"details" : "A vulnerability in Koji was found. An unsanitized input allows for an XSS attack. Javascript code from a malicious link could be reflected in the resulting web page. It is not expected to be able to submit an action or make a change in Koji due to existing XSS protections in the code.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "koji"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.35.0"
}, {
"fixed" : "1.35.1"
} ]
} ],
"versions" : [ "1.35.0" ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "koji"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.34.0"
}, {
"fixed" : "1.34.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "koji"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.33.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-9427"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2024-9427"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2316047"
}, {
"type" : "WEB",
"url" : "https://docs.pagure.org/koji/CVEs/CVE-2024-9427"
}, {
"type" : "PACKAGE",
"url" : "https://pagure.io/koji"
}, {
"type" : "WEB",
"url" : "https://pagure.io/koji/c/8c72d90d7bb991f8fb193851b80847ac9e9474a4?branch=master"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-26T20:22:34Z",
"nvd_published_at" : "2024-12-24T04:15:07Z"
}
}