CVE-2026-42301

Improper Input Validation leading to Improper Control of Generation of Code ('Code Injection') in pyp2spec

State
Published
Severity
7.8 High
Published
May 9, 2026
Updated
May 11, 2026
Reserved
Apr 26, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HGitHub_M

Weaknesses

  • CWE-20 Improper Input Validation
  • CWE-94 Improper Control of Generation of Code ('Code Injection')

Affected Products

ProductVersions
pyp2specbefeleme
  • < 0.14.1Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.