CVE-2016-10516: Cross-Site Scripting (XSS) in Werkzeug
Summary
CVE-2016-10516: Cross-site scripting (XSS) vulnerability in the render_full function in debug/tbtools.py in the debugger in Pallets Werkzeug before 0.11.11 (as used in Pallets Flask and other products) allows remote attackers to inject... Affects werkzeug versions < 0.11.11. Fixed in 0.11.11. How to fix ↓
Also tracked for
- python-werkzeug · Debian:11
The same CVE-2016-10516 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
Werkzeug is a Python library that provides essential utilities for building web applications. It is commonly used in frameworks like Flask. Werkzeug versions prior to 0.11.11 are affected by a cross-site scripting (XSS) vulnerability in the debugger's render_full function. This vulnerability allows remote attackers to inject arbitrary web script or HTML through a field that contains an exception message.
Vulnerability Detail
The vulnerability originates from the render_full function in debug/tbtools.py in the Werkzeug debugger. By exploiting this vulnerability, an attacker can inject malicious web script or HTML into a field that contains an exception message. This can lead to various consequences, such as executing arbitrary code in the victim's browser, stealing sensitive information, or performing phishing attacks.
How To Fix
Latest published version: 3.1.9 as of 22 Oct 2026
pip install --upgrade "werkzeug==3.1.9"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.11.11
This is the first release that contains the fix.
pip install --upgrade "werkzeug==0.11.11"
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 apply the recommended fix by upgrading to a secure version of Werkzeug.
Conclusion
The cross-site scripting (XSS) vulnerability in Werkzeug versions prior to 0.11.11 can have severe consequences, including the execution of arbitrary code and the theft of sensitive information. It is crucial to upgrade to a secure version of Werkzeug to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for werkzeug →
FAQ
This vulnerability allows attackers to inject malicious web script or HTML, potentially leading to the execution of arbitrary code in the victim's browser or the theft of sensitive information.
Versions of Werkzeug prior to 0.11.11 are affected by this vulnerability.
No, there is no known workaround for this vulnerability. It is essential to upgrade to a secure version of Werkzeug.
You can upgrade Werkzeug by using the package manager or by modifying the project's dependency configuration file (e.g., requirements.txt) to specify the desired version of Werkzeug.
You can find more information about this vulnerability in the Werkzeug advisory database: https://github.com/pypa/advisory-database/blob/main/vulns/werkzeug/PYSEC-2017-43.yaml
Related vulnerabilities
Recent vulnerabilities recorded for werkzeug.