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
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Python (PyPI) | pyp2spec | < 0.14.1 | 0.14.1 |
Verweise
- 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
- CVSS-Vektor
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H- Schwäche (CWE)
CWE-20, CWE-94- Plattform
- Python (PyPI)
- Paket
pyp2spec- Veröffentlicht
- 04.05.2026
- Aktualisiert
- 11.10.2026 14:18
Quellen und Lizenzen
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
Schwachstellenhistorie: pyp2spec
Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
Dies ist die einzige bekannte Schwachstelle dieses Pakets.
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.