CVE-2026-42301: Pyp2spec Pyp2spec Is Vulnerable To Code Vulnerability
HIGHCVE-2026-42301 is a HIGH (CVSS 7.8) pyp2spec is vulnerable to code vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Pyp2spec libraries in the PyPI ecosystem. The issue involves pyp2spec is vulnerable to code injection. Remediation is available by upgrading affected packages to version 0.14.1.
CVE-2026-42301 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-42301
To remediate this vulnerability, upgrade all affected Pyp2spec 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 pyp2spec>=0.14.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pyp2spec
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-42301, inspect your installed packages using pip:
pip show pyp2spec
Analyze the terminal output to locate any version of Pyp2spec in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.14.1), your application is affected.
Note: The pip show pyp2spec command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Pyp2spec, 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-2026-42301 Affected Pyp2spec Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pyp2spec
|
PyPI |
< 0.14.1
|
0.14.1
|
References
Frequently Asked Questions
What is CVE-2026-42301?
Which Pyp2spec versions are affected?
What version fixes CVE-2026-42301?
Is pyp2spec affected?
What is the CVSS score of CVE-2026-42301?
What CWE is associated with CVE-2026-42301?
How can I check PyPI dependencies for CVE-2026-42301?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r35x-v8p8-xvhw",
"modified" : "2026-05-13T13:39:32Z",
"published" : "2026-05-04T20:14:38Z",
"aliases" : [ "CVE-2026-42301" ],
"summary" : "pyp2spec is Vulnerable to Code Injection",
"details" : "### Impact\npyp2spec was writing PyPI package metadata (e.g. the summary field) into the generated spec file without escaping RPM macro directives. When a packager then runs rpmbuild, those directives get evaluated, so a malicious package can execute arbitrary commands on the build machine.\n\nThe macro evaluates during spec parsing, not only during the build step. Any rpm tool touching the generated spec triggers execution, `rpmbuild -bs`, `rpmbuild --nobuild`, `rpm -q --specfile`, so the victim doesn't need to commit to a full build before getting compromised. The realistic attack path is typosquatting or targeting a package known to be under Fedora review rather than drive-by publishing. Fedora packagers hold dist-git SSH keys, Koji build credentials, and Bodhi update credentials, so compromise of one packager's workstation enables committing malicious source to dist-git and riding it through the normal build pipeline to end users.\n\n### Patches\nPatched in 0.14.1.\n\n### Workarounds\nNone",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pyp2spec"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.14.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/befeleme/pyp2spec/security/advisories/GHSA-r35x-v8p8-xvhw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42301"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/befeleme/pyp2spec"
}, {
"type" : "WEB",
"url" : "https://github.com/befeleme/pyp2spec/releases/tag/v0.14.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-04T20:14:38Z",
"nvd_published_at" : "2026-05-09T04:16:25Z"
}
}