{"id":"CVE-2026-42301","published":"2026-05-09T03:59:34Z","modified":"2026-05-11T17:34:43Z","title":"Improper Input Validation leading to Improper Control of Generation of Code ('Code Injection') in pyp2spec","vendor":"befeleme","product":"pyp2spec","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00198,"percentile":0.09722,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/befeleme/pyp2spec/security/advisories/GHSA-r35x-v8p8-xvhw","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/befeleme/pyp2spec/releases/tag/v0.14.1","tags":["x_refsource_MISC"]}],"priority":{"score":7.4,"factors":[{"name":"EPSS percentile","points":1.94},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"befeleme","affectedVersions":[{"vendor":"befeleme","product":"pyp2spec","versions":["< 0.14.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-05-11T17:33:41.998650Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pyp2spec","vulnerableRanges":["<0.14.1"],"patched":["0.14.1"],"from":["GHSA-r35x-v8p8-xvhw","PYSEC-2026-3003"],"provenance":"source"}],"summary":{"text":"pyp2spec, a tool that generates Fedora RPM spec files for Python projects, fails to escape RPM macro directives in PyPI package metadata such as the summary field before writing it into the generated spec file. The flaw affects versions prior to 0.14.1, which contains the fix. An attacker can supply a malicious PyPI package whose metadata contains RPM macros that execute arbitrary commands when a packager runs rpmbuild on the generated spec, which requires local access to the build machine and user interaction by the packager who builds the package.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:12:34Z"},"euvd":{"id":"EUVD-2026-28896","exploited":false,"provenance":"source"}}