CVE-2016-9910: Cross-Site Scripting (XSS) in html5lib
Summary
CVE-2016-9910: The serializer in html5lib before 0.99999999 might allow remote attackers to conduct cross-site scripting (XSS) attacks by leveraging mishandling of special characters in attribute values, a different vulnerability than... Affects html5lib across 2 version ranges.
< 0.999999999
< 9b8d8eb5afbc066b7fac9390f5ec75e5e8a7cab7
Fixed in 9b8d8eb5afbc066b7fac9390f5ec75e5e8a7cab7. How to fix ↓
Also tracked for
- html5lib · Debian:11
The same CVE-2016-9910 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
html5lib is a Python library for parsing HTML documents. It is widely used in various Python projects to process and manipulate HTML content. This vulnerability affects versions prior to 0.99999999 of html5lib. The library mishandles special characters in attribute values, which can be exploited by remote attackers to conduct cross-site scripting (XSS) attacks. This vulnerability is different from CVE-2016-9909.
Vulnerability Detail
The vulnerability in html5lib arises from the mishandling of special characters in attribute values. By injecting malicious code into attribute values, an attacker can execute arbitrary scripts in the context of a victim's browser. This can lead to various security issues, such as session hijacking, defacement of web pages, or theft of sensitive information. The vulnerability was fixed in version 0.99999999 of html5lib.
How To Fix
Latest published version: 1.1.0 as of 22 Oct 2026
pip install --upgrade "html5lib==1.1.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
9b8d8eb5afbc066b7fac9390f5ec75e5e8a7cab7
This is the first release that contains the fix.
pip install --upgrade "html5lib==9b8d8eb5afbc066b7fac9390f5ec75e5e8a7cab7"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is crucial to update to the fixed version of html5lib to ensure the security of the application.
Conclusion
The vulnerability in html5lib prior to version 0.99999999 allows for cross-site scripting (XSS) attacks. It is crucial to update to the fixed version to ensure the security of your application. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for html5lib →
FAQ
html5lib is a Python library used for parsing HTML documents. It provides a convenient way to process and manipulate HTML content in Python applications.
Cross-site scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to various attacks, such as session hijacking or theft of sensitive information.
By injecting specially crafted code into attribute values, an attacker can execute arbitrary scripts in the context of a victim's browser. This can be done through user input fields or by manipulating URLs.
Yes, this vulnerability has been fixed in version 0.99999999 of html5lib. It is recommended to update to the latest version to ensure the security of your application.
No, there are no known workarounds for this vulnerability. It is essential to update to the fixed version of html5lib.
Related vulnerabilities
Recent vulnerabilities recorded for html5lib.