Vulnerability · Published May 9, 2026 · Assigned by GitHub_M

CVE-2026-42301Improper Input Validation leading to Improper Control of Generation of Code ('Code Injection') in pyp2spec

High 7.8

In plain English

A high-severity improper input validation in pyp2spec from befeleme. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 10% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.2%top 90.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIpyp2spec0.14.1GHSA-r35x-v8p8-xvhw
PyPIpyp2spec0.14.1PYSEC-2026-3003

Affected products (as reported)

VendorProductVersions
befeleme pyp2spec < 0.14.1

Weakness: CWE-20, CWE-94 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References