CVE-2016-20021: Portage Gentoo Portage Missing PGP Validation Vulnerability
HIGHCVE-2016-20021 is a HIGH (CVSS 9.8) gentoo portage missing pgp validation vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Portage libraries in the PyPI ecosystem. The issue involves gentoo portage missing pgp validation of executed code. Remediation is available by upgrading affected packages to version 3.0.47.
CVE-2016-20021 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2016-20021
To remediate this vulnerability, upgrade all affected Portage 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 portage>=3.0.47
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show portage
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2016-20021, inspect your installed packages using pip:
pip show portage
Analyze the terminal output to locate any version of Portage in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.47), your application is affected.
Note: The pip show portage command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Portage, 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-2016-20021 Affected Portage Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
portage
|
PyPI |
< 3.0.47
|
3.0.47
|
References
Frequently Asked Questions
What is CVE-2016-20021?
Which Portage versions are affected?
What version fixes CVE-2016-20021?
Is portage affected?
What is the CVSS score of CVE-2016-20021?
What CWE is associated with CVE-2016-20021?
How can I check PyPI dependencies for CVE-2016-20021?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pw5x-x5jw-ccmh",
"modified" : "2024-08-30T23:37:34Z",
"published" : "2024-01-12T03:30:49Z",
"aliases" : [ "CVE-2016-20021" ],
"summary" : "Gentoo Portage missing PGP validation of executed code",
"details" : "In Gentoo Portage before 3.0.47, there is missing PGP validation of executed code: the standalone emerge-webrsync downloads a .gpgsig file but does not perform signature verification.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "portage"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.47"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-20021"
}, {
"type" : "WEB",
"url" : "https://github.com/gentoo/portage/commit/28cd240fb23d880b8641a058831c6762db71c3e2"
}, {
"type" : "WEB",
"url" : "https://bugs.gentoo.org/597800"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gentoo/portage"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/portage/PYSEC-2024-10.yaml"
}, {
"type" : "WEB",
"url" : "https://gitweb.gentoo.org/proj/portage.git/tree/NEWS"
}, {
"type" : "WEB",
"url" : "https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b3c80502e96406b4b175e2ee79eb65f3f3cd9f6"
}, {
"type" : "WEB",
"url" : "https://wiki.gentoo.org/wiki/Portage"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-08-30T23:37:34Z",
"nvd_published_at" : "2024-01-12T03:15:08Z"
}
}