# Mozilla Bleach ReDoS in linkify with parse_email enabled

Source: https://junglewise.ai/threats/mozilla-bleach-redos-in-linkify-with-parse-email-enabled-47729578  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-16. Updated: 2026-06-16  
License: CC BY 4.0 with a link back

Severity: medium · CVSS 4.3 · Published 2026-06-16

Bleach is a Python library used to clean and sanitize untrusted HTML text, often used in web applications to process user comments or profiles. A flaw in its optional email-linking feature allows an attacker to submit specially crafted text that causes the server to consume excessive CPU resources. This can lead to a denial-of-service condition where the application becomes slow or unresponsive to other users.

Technologies: [bleach (PyPI)](https://junglewise.ai/threats/technologies/bleach). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Medium severity, with a CVSS score of 4.3, published 16 June 2026.

**Which products and versions are affected?** bleach (PyPI) = 6.3.0.

**Is there a fix for This vulnerability?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run bleach (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a Regular Expression Denial of Service (ReDoS) (CWE-1333) located in 'bleach/linkifier.py'. When 'parse_email=True' is passed to 'bleach.linkify()', the 'EMAIL_RE' regular expression is applied to user-controlled text via 'finditer()'. The regex contains a repeated dot-atom pattern that exhibits superlinear complexity when processing long strings of repeated segments (e.g., 'a.a.a...') that do not contain an '@' symbol. An attacker can exploit this by submitting a payload of approximately 30 KB, causing multi-second CPU hangs per request. No patch was available at the time of the advisory.

## Affected products

- Mozilla bleach 6.3.0

## Timeline

- 2026-06-05: disclosed
- 2026-06-16: advisory

## References

- [https://api.github.com/users/0xHunSec](https://api.github.com/users/0xHunSec)
- [https://github.com/0xHunSec](https://github.com/0xHunSec)
- [https://api.github.com/users/0xHunSec/gists%7B/gist_id%7D](https://api.github.com/users/0xHunSec/gists%7B/gist_id%7D)
- [https://api.github.com/users/0xHunSec/repos](https://api.github.com/users/0xHunSec/repos)
- [https://avatars.githubusercontent.com/u/39668014?v=4](https://avatars.githubusercontent.com/u/39668014?v=4)
- [https://api.github.com/users/0xHunSec/events%7B/privacy%7D](https://api.github.com/users/0xHunSec/events%7B/privacy%7D)

## Related threats

- [Mozilla Bleach XSS via unsanitized formaction attribute](https://junglewise.ai/threats/mozilla-bleach-xss-via-unsanitized-formaction-attribute-604755fa)
- [Mozilla Bleach URI sanitization bypass via Unicode characters](https://junglewise.ai/threats/mozilla-bleach-uri-sanitization-bypass-via-unicode-characters-79149728)
- [Cross-site scripting in Bleach](https://junglewise.ai/threats/cve-2021-23980-cross-site-scripting-in-bleach)
- [regular expression denial-of-service (ReDoS) in Bleach](https://junglewise.ai/threats/cve-2020-6817-regular-expression-denial-of-service-redos-in-bleach)
- [Bleach vulnerable to mutation XSS via whitelisted math or svg and raw tag](https://junglewise.ai/threats/cve-2020-6816-bleach-vulnerable-to-mutation-xss-via-whitelisted-math-or-svg-and)
