Source: python3.11
Version: 3.11.2-6+deb12u6
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

CVE-2025-69534 [1] affects Python 3.11 (bookworm), and also older Python
versions. It was originally reported against python-markdown as such:

> Python-Markdown version 3.8 contain a vulnerability where malformed
> HTML-like sequences can cause html.parser.HTMLParser to raise an
> unhandled AssertionError during Markdown parsing. Because
> Python-Markdown does not catch this exception, any application that
> processes attacker-controlled Markdown may crash. This enables remote,
> unauthenticated Denial of Service in web applications, documentation
> systems, CI/CD pipelines, and any service that renders untrusted
> Markdown. The issue was acknowledged by the vendor and fixed in
> version 3.8.1. This issue causes a remote Denial of Service in any
> application parsing untrusted Markdown, and can lead to Information
> Disclosure through uncaught exceptions.

While reported against python-markdown, the actual issue in in Python
itself, and it was fixed in Python.

The fix was backported upstream all the way back to Python 3.9 (as part
of a larger changeset to improve/fix the HTML parser). After the fix,
the new behavior is that the parser returns None instead of throwing an
exception.

Reproducer:

```
#!/usr/bin/env python3
import html.parser
html.parser.HTMLParser().feed("<![\n")
``` 

Question below!

I'd like to have the opinion of the Python maintainers and/or the
Release team: is it wise to backport this fix, given it changes the
behavior of the parser?

I'm worried that caller relies on the parser throwing an exception, and
starts to misbehave if it doesn't. OTOH, caller probably checks if the
return value is None, so hopefully the change will not break any
existing code?

Another thing worth noting: originally the issue was reported against
python-markdown. Interestingly openSUSE claims to fix the issue in
python-markdown only, cf [2].

Best,

Arnaud

[1]: https://security-tracker.debian.org/tracker/CVE-2025-69534
[2]: https://bugzilla.suse.com/show_bug.cgi?id=CVE-2025-69534

Reply via email to