Bug 2468452 (CVE-2026-42301)

Summary: CVE-2026-42301 pyp2spec: pyp2spec: Arbitrary command execution via unescaped RPM macro directives
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: bbrownin, dfreiber, drow, jburrell, jkoehler, ljawale, lphiri, luizcosta, nweather, rbobbitt, rhel-process-autobot, sdawley, teagle, vkumar, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in pyp2spec, a tool that generates Fedora RPM spec files for Python projects. This vulnerability allows a malicious Python Package Index (PyPI) package to execute arbitrary commands on a build machine. This occurs because pyp2spec writes PyPI package metadata, such as the summary field, into the generated spec file without properly escaping RPM macro directives. When a packager subsequently runs rpmbuild, these unescaped directives are evaluated, leading to the execution of arbitrary commands.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2477913    
Bug Blocks:    

Description OSIDB Bzimport 2026-05-09 05:02:11 UTC
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.