Improper Input Validation leading to Improper Control of Generation of Code ('Code Injection') in pyp2spec
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| befeleme | pyp2spec | before 0.14.1 | 0.14.1 | Patch available | CNA |
| — | pyp2spec (PyPI) | before 0.14.1 | 0.14.1 | Patch available | GHSA-r35x-v8p8-xvhw |
- pyp2spec Vendorbefeleme Affected before 0.14.1 Fixed in 0.14.1 Patch available CNA
- pyp2spec (PyPI) Vendor— Affected before 0.14.1 Fixed in 0.14.1 Patch available GHSA-r35x-v8p8-xvhw
Remediation
- Fix · CNA pyp2spec (befeleme) Fixed in 0.14.1
- Fix · GHSA-r35x-v8p8-xvhw pyp2spec (PyPI) Fixed in 0.14.1 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-42301
- 2026-10-03 Alias added: GHSA-r35x-v8p8-xvhw
References
Sources
- CVE-2026-42301 · CVE Program
- CVE-2026-42301 · NVD
- FIRST EPSS
- GHSA-r35x-v8p8-xvhw · GitHub Advisory Database · CC BY 4.0
- CVE-2026-42301 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences