CVE-2025-68142 PyMdown Extensions has ReDOS bug in Figure Capture extension

Low 2.7 Published Updated

Attackers can cause denial of service via ReDOS in the figure caption extension when processing malicious user content.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-68142?

CVE-2025-68142 is a low-severity denial of service vulnerability in facelessuser pymdown-extensions, published on 16 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

PyMdown Extensions is a set of extensions for the `Python-Markdown` markdown project. Versions prior to 10.16.1 have a ReDOS bug found within the figure caption extension (`pymdownx.blocks.caption`). In systems that take unchecked user content, this could cause long hanges when processing the data if a malicious payload was crafted. This issue is patched in Release 10.16.1. As a workaround, those who process unknown user content without timeouts or other safeguards in place to prevent really large, malicious content being aimed at systems may avoid the use of `pymdownx.blocks.caption` until they're able to upgrade.

Weakness: CWE-1333

Which versions are affected by CVE-2025-68142?

3 open source packages ship an affected version, including pymdown-extensions. It affects 1 product.

PackageAffectedFixed in
pymdown-extensions PyPIAll versions10.16.1
pymdown-extensions PyPIAll versions10.16.1
pymdown-extensions PyPIAll versions10.16.1

Products include Facelessuser Pymdown Extensions.

How do I fix CVE-2025-68142?

Upgrade pymdown-extensions to 10.16.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-68142 being exploited?

There is no known exploitation of CVE-2025-68142 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2025-68142, GHSA-r6h4-mm7h-8pmq, PYSEC-2026-1825, UBUNTU-CVE-2025-68142.

Is CVE-2025-68142 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free