Vulnerability · Published May 9, 2026 · Assigned by GitHub_M
CVE-2026-42301Improper Input Validation leading to Improper Control of Generation of Code ('Code Injection') in pyp2spec
High 7.8
In plain English
A high-severity improper input validation in pyp2spec from befeleme. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 10% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | pyp2spec | 0.14.1 | GHSA-r35x-v8p8-xvhw |
| PyPI | pyp2spec | 0.14.1 | PYSEC-2026-3003 |
Affected products (as reported)
Weakness: CWE-20, CWE-94 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/befeleme/pyp2spec/security/advisories/GHSA-r35x-v8p8-xvhw x_refsource_CONFIRM
- https://github.com/befeleme/pyp2spec/releases/tag/v0.14.1 x_refsource_MISC