CVE-2019-17109: Koji Koji Hub Allows Arbitrary Upload Vulnerability
HIGHCVE-2019-17109 is a HIGH (CVSS 6.5) koji hub allows arbitrary upload vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Koji libraries in the PyPI ecosystem. The issue involves koji hub allows arbitrary upload destinations. Remediation is available by upgrading affected packages to version 1.14.3, 1.15.3, 1.16.3, 1.17.1, 1.18.1.
CVE-2019-17109 at a Glance
Security Impact
CVSS: 6.5
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:N/I:H/A:N).
How to Fix CVE-2019-17109
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.14.3
pip install koji>=1.15.3
pip install koji>=1.16.3
pip install koji>=1.17.1
pip install koji>=1.18.1
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-2019-17109, 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.14.3), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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-2019-17109 Affected Koji Versions
5 component(s)References
Frequently Asked Questions
What is CVE-2019-17109?
Which Koji versions are affected?
What version fixes CVE-2019-17109?
Is koji affected?
What is the CVSS score of CVE-2019-17109?
What CWE is associated with CVE-2019-17109?
How can I check PyPI dependencies for CVE-2019-17109?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7498-c9fm-g64p",
"modified" : "2024-09-27T18:30:23Z",
"published" : "2022-05-24T16:58:31Z",
"aliases" : [ "CVE-2019-17109" ],
"summary" : "koji hub allows arbitrary upload destinations",
"details" : "The way that the hub code validates upload paths allows for an attacker to choose an arbitrary destination for the uploaded file.\nUploading still requires login. However, an attacker with credentials could damage the integrity of the Koji system.\n\n### Workaround\nThere is no known workaround. All Koji admins are encouraged to update to a fixed version as soon as possible.\n\n### Fix\nKoji versions 1.14.3, 1.15.3, 1.16.3, 1.17.1, and 1.18.1 all include patches to solve this vulnerability.\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "koji"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.14.0"
}, {
"fixed" : "1.14.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "koji"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.15.0"
}, {
"fixed" : "1.15.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "koji"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.16.0"
}, {
"fixed" : "1.16.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "koji"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.17.0"
}, {
"fixed" : "1.17.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "koji"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.18.0"
}, {
"fixed" : "1.18.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-17109"
}, {
"type" : "WEB",
"url" : "https://github.com/koji-project/koji/commit/91d6f0b607c7f5af666dfb56931f1db4e38c28a5"
}, {
"type" : "WEB",
"url" : "https://docs.pagure.org/koji/CVE-2019-17109"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/koji-project/koji"
}, {
"type" : "WEB",
"url" : "https://github.com/koji-project/koji/blob/d0507c4d2d2269daa984db642e3bd957dff18948/docs/source/CVEs/CVE-2019-17109.rst"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/koji/PYSEC-2019-183.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4BGUXMZIAQFFNNQ7PEFDAYQCXXKJR76U"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7PSCCFHLNVFLDPC7DB4UJGXD6ZWBSY57"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DEQYYGWLJBQQVTAC7E7XSDGVF27NPMPB"
}, {
"type" : "WEB",
"url" : "https://pagure.io/koji/commits/master"
}, {
"type" : "WEB",
"url" : "https://pagure.io/koji/issue/1634"
}, {
"type" : "WEB",
"url" : "https://pagure.io/koji/pull-request/1686"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2019/10/09/5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-29T09:53:43Z",
"nvd_published_at" : "2019-10-09T22:15:00Z"
}
}