CVE-2026-42301 Details
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.
A code injection vulnerability has been identified in pyp2spec versions prior to 0.14.1. The issue arises because pyp2spec was not properly escaping RPM macro directives in the PyPI package metadata, such as the summary field, before writing it into the generated Fedora RPM spec file. As a result, when the spec file is processed with rpmbuild or other RPM tools, these directives are evaluated, potentially leading to the execution of arbitrary commands on the build machine. This vulnerability can be exploited by targeting packages known to be under Fedora review, taking advantage of the credentials held by Fedora packagers.
Users can upgrade to pyp2spec version 0.14.1 or later to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed May 9, 2026CISA-ADP
Assessed May 11, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/befeleme/pyp2spec/releases/tag/v0.14.1 | [email protected] | Source CodeVendor |
| https://github.com/befeleme/pyp2spec/security/advisories/GHSA-r35x-v8p8-xvhw | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-20 | Improper Input Validation | [email protected] |
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| befeleme pyp2spec | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 9, 2026 | New CVE Received | [email protected] |
Volerion