pyp2spec is Vulnerable to Code Injection
Impact
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.
The 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.
Patches
Patched in 0.14.1.
Workarounds
None
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Python (PyPI) | pyp2spec | < 0.14.1 | 0.14.1 |
Referencias
- https://github.com/befeleme/pyp2spec/security/advisories/GHSA-r35x-v8p8-xvhw
- https://nvd.nist.gov/vuln/detail/CVE-2026-42301
- https://github.com/befeleme/pyp2spec
- https://github.com/befeleme/pyp2spec/releases/tag/v0.14.1
- https://pypi.org/project/pyp2spec
- https://github.com/advisories/GHSA-r35x-v8p8-xvhw
- Vector CVSS
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H- Debilidad (CWE)
CWE-20, CWE-94- Plataforma
- Python (PyPI)
- Paquete
pyp2spec- Publicada
- 04.05.2026
- Actualizado
- 11.10.2026 14:18
Fuentes y licencias
OSV / GitHub Advisory Database - PYSEC-2026-3003 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-r35x-v8p8-xvhw - CC BY 4.0
Historial de vulnerabilidades: pyp2spec
Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
Esta es la única vulnerabilidad conocida de este paquete.
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.