CVE-2026-42301 json
Improper Input Validation leading to Improper Control of Generation of Code ('Code Injection') in pyp2spec
published 2026-05-04 6 mo ago modified 2026-07-24 3 mo ago also GHSA-r35x-v8p8-xvhw , PYSEC-2026-3003 , EUVD-2026-28896
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 9%
- public exploits
- 0
- none known
Summary
pyp2spec generates working Fedora RPM spec file for Python projects. Prior to version 0.14.1, pyp2spec 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. This issue has been patched in version 0.14.1.
Patch / fix
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-42301 updated cvss 7.3
pyp2spec: pyp2spec: Arbitrary command execution via unescaped RPM macro directives
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 5 mo ago
Exploit prediction
0.20% chance of exploitation in the next 30 days, higher than 9% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pyp2spec | <0.14.1 |
0.14.1 |
Affected products
- befeleme pyp2spec
Classification
References
-
github.com
/befeleme/pyp2spec/security/advisories/GHSA-r35x-v8p8-xvhw
web
-
github.com
/befeleme/pyp2spec/releases/tag/v0.14.1
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-42301
advisory
-
github.com
/befeleme/pyp2spec
package
-
pypi.org
/project/pyp2spec
package
-
github.com
/advisories/GHSA-r35x-v8p8-xvhw
advisory
Sources
- CVE List CVE-2026-42301
- GitHub Advisory GHSA-r35x-v8p8-xvhw
- NVD CVE-2026-42301
- OSV PYSEC-2026-3003
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.