CVE-2024-58382 league/commonmark before 2.6.0 Denial of Service via Quadratic Complexity

High 8.7 Published Updated

Attackers can cause denial of service by submitting crafted Markdown inputs that trigger quadratic complexity in the league/commonmark PHP library.

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

What is CVE-2024-58382?

CVE-2024-58382 is a high-severity denial of service vulnerability in thephpleague commonmark, published on 9 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

league/commonmark versions before 2.6.0 contain polynomial time complexity vulnerabilities in Markdown parsing that allow attackers to cause denial of service. Attackers can submit carefully crafted Markdown inputs designed to trigger worst-case performance, and sending multiple requests in parallel exhausts CPU resources and PHP-FPM processes.

Weakness: CWE-407

Which versions are affected by CVE-2024-58382?

2 open source packages ship an affected version, including league/commonmark.

PackageAffectedFixed in
league/commonmark PackagistAll versions2.6.0
league/commonmark PackagistAll versions2.6.0

How do I fix CVE-2024-58382?

Upgrade league/commonmark to 2.6.0 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-2024-58382 being exploited?

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

Sources

Also known as CLSA-2025-1766364770, DEBIAN-CVE-2024-58382, GHSA-c2pc-g5qf-rfrf, GHSA-fv22-86fq-c33q.

Is CVE-2024-58382 in your software?

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

Check your SBOMs for free