{"id":"CVE-2026-42301","aliases":["CVE-2026-42301","GHSA-r35x-v8p8-xvhw","PYSEC-2026-3003"],"related":[],"kind":"vulnerability","state":"published","title":"Improper Input Validation leading to Improper Control of Generation of Code ('Code Injection') in pyp2spec","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### Impact\npyp2spec 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.\n\nThe macro evaluates during spec parsing, not only during the build step. Any rpm tool touching the generated spec triggers execution, `rpmbuild -bs`, `rpmbuild --nobuild`, `rpm -q --specfile`, so the victim doesn't need to commit to a full build before getting compromised. The realistic attack path is typosquatting or targeting a package known to be under Fedora review rather than drive-by publishing. Fedora packagers hold dist-git SSH keys, Koji build credentials, and Bodhi update credentials, so compromise of one packager's workstation enables committing malicious source to dist-git and riding it through the normal build pipeline to end users.\n\n### Patches\nPatched in 0.14.1.\n\n### Workarounds\nNone","format":"markdown","source":"ghsa"},{"lang":"es","text":"pyp2spec genera un archivo spec RPM de Fedora funcional para proyectos Python. Antes de la versión 0.14.1, pyp2spec escribía los metadatos del paquete PyPI (por ejemplo, el campo 'summary') en el archivo spec generado sin escapar las directivas de macro RPM. Cuando un empaquetador ejecuta rpmbuild, esas directivas se evalúan, por lo que un paquete malicioso puede ejecutar comandos arbitrarios en la máquina de compilación. Este problema ha sido parcheado en la versión 0.14.1.","source":"nvd"}],"published":"2026-05-04T20:14:38.000Z","modified":"2026-07-24T21:10:00.143Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-20","CWE-94"],"affected":[{"ranges":[{"version":"< 0.14.1","status":"affected"}],"vendor":"befeleme","product":"pyp2spec","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.14.1"}],"ecosystem":"PyPI","package":"pyp2spec","purl":"pkg:pypi/pyp2spec","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.14.1"}],"ecosystem":"PyPI","package":"pyp2spec","purl":"pkg:pypi/pyp2spec","source":"pysec"}],"references":[{"url":"https://github.com/befeleme/pyp2spec/security/advisories/GHSA-r35x-v8p8-xvhw","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/befeleme/pyp2spec/releases/tag/v0.14.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42301","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/befeleme/pyp2spec","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/pyp2spec","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-r35x-v8p8-xvhw","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-05-11T17:33:41.998Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42301","url":"https://www.cve.org/CVERecord?id=CVE-2026-42301","licence":"CVE Terms of Use","modified":"2026-05-11T17:34:43.929Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r35x-v8p8-xvhw","url":"https://github.com/advisories/GHSA-r35x-v8p8-xvhw","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:26.704Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42301","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42301","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3003","url":"https://osv.dev/vulnerability/PYSEC-2026-3003","licence":"CC-BY-4.0","modified":"2026-07-13T16:33:08.866Z"}],"updatedAt":"2026-11-25T22:59:21.138Z","epss":{"score":0.00198,"percentile":0.10008,"date":"2026-12-01T12:00:22.000Z"}}