Bleach URI Scheme Restriction Bypass
An issue was discovered in Bleach 2.1.x before 2.1.3. Attributes that have URI values weren't properly sanitized if the values contained character entities. Using character entities, it was possible to construct a URI value with a scheme that was not allowed that would slide through unsanitized.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | bleach | >= 2.1.0, < 2.1.3 | 2.1.3 |
References
- https://github.com/mozilla/bleach/releases/tag/v2.1.3
- https://github.com/mozilla/bleach/commit/c5df5789ec3471a31311f42c2d19fc2cf21b35ef
- https://bugs.debian.org/892252
- https://github.com/advisories/GHSA-m9mq-p2f9-cfqv
- https://nvd.nist.gov/vuln/detail/CVE-2018-7753
- https://github.com/mozilla/bleach
- https://github.com/pypa/advisory-database/tree/main/vulns/bleach/PYSEC-2018-51.yaml
- CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-20- Platform
- Python (PyPI)
- Package
bleach- Disclosed
- 07.03.2018
- Updated
- 11.10.2026 12:19
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2018-51 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-m9mq-p2f9-cfqv - CC BY 4.0
Vulnerability history: bleach
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
- 8
- First → latest
- 03.2018 06.2026
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- High 1
- Medium 5
- Low 1
Disclosures per year
- 2018: 1
- 2019: 0
- 2020: 3
- 2021: 1
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 3
-
Bleach URI Scheme Restriction Bypass this entry
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.