CVE-2026-42301: CWE-20: Improper Input Validation in befeleme pyp2spec
CVE-2026-42301 is a high-severity vulnerability in befeleme's pyp2spec tool prior to version 0. 14. 1. The tool improperly handles PyPI package metadata by writing fields such as the summary into RPM spec files without escaping RPM macro directives. This allows malicious package metadata to inject and execute arbitrary commands during the rpmbuild process on the build machine. The issue has been fixed in pyp2spec version 0. 14. 1.
AI Analysis
Technical Summary
The vulnerability in pyp2spec (versions before 0.14.1) arises from improper input validation and escaping of PyPI package metadata when generating Fedora RPM spec files. Specifically, RPM macro directives embedded in metadata fields like the summary are not escaped, causing them to be evaluated during the rpmbuild process. This can lead to arbitrary command execution on the build system. The vulnerability is tracked as CWE-20 (Improper Input Validation) and CWE-94 (Improper Control of Generation of Code). The CVSS 3.1 base score is 7.8, reflecting high impact on confidentiality, integrity, and availability, with local attack vector and required user interaction. The issue has been patched in version 0.14.1 of pyp2spec.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary commands on the machine performing the RPM build by injecting malicious RPM macro directives through PyPI package metadata. This compromises the build environment's confidentiality, integrity, and availability. The attack requires local access to run rpmbuild on a crafted spec file generated by a vulnerable pyp2spec version and user interaction to initiate the build process.
Mitigation Recommendations
Upgrade pyp2spec to version 0.14.1 or later, where this vulnerability has been patched by properly escaping RPM macro directives in package metadata. Until upgraded, avoid building RPMs from untrusted PyPI packages using vulnerable pyp2spec versions. Patch status is confirmed fixed in version 0.14.1.
CVE-2026-42301: CWE-20: Improper Input Validation in befeleme pyp2spec
Description
CVE-2026-42301 is a high-severity vulnerability in befeleme's pyp2spec tool prior to version 0. 14. 1. The tool improperly handles PyPI package metadata by writing fields such as the summary into RPM spec files without escaping RPM macro directives. This allows malicious package metadata to inject and execute arbitrary commands during the rpmbuild process on the build machine. The issue has been fixed in pyp2spec version 0. 14. 1.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in pyp2spec (versions before 0.14.1) arises from improper input validation and escaping of PyPI package metadata when generating Fedora RPM spec files. Specifically, RPM macro directives embedded in metadata fields like the summary are not escaped, causing them to be evaluated during the rpmbuild process. This can lead to arbitrary command execution on the build system. The vulnerability is tracked as CWE-20 (Improper Input Validation) and CWE-94 (Improper Control of Generation of Code). The CVSS 3.1 base score is 7.8, reflecting high impact on confidentiality, integrity, and availability, with local attack vector and required user interaction. The issue has been patched in version 0.14.1 of pyp2spec.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary commands on the machine performing the RPM build by injecting malicious RPM macro directives through PyPI package metadata. This compromises the build environment's confidentiality, integrity, and availability. The attack requires local access to run rpmbuild on a crafted spec file generated by a vulnerable pyp2spec version and user interaction to initiate the build process.
Mitigation Recommendations
Upgrade pyp2spec to version 0.14.1 or later, where this vulnerability has been patched by properly escaping RPM macro directives in package metadata. Until upgraded, avoid building RPMs from untrusted PyPI packages using vulnerable pyp2spec versions. Patch status is confirmed fixed in version 0.14.1.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-26T12:13:55.552Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69ffe1b2cbff5d8610ead44e
Added to database: 5/10/2026, 1:38:58 AM
Last enriched: 5/10/2026, 1:40:09 AM
Last updated: 5/10/2026, 8:40:35 AM
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.