{"answers":{"affected":"2 open source packages ship an affected version, including league/commonmark.","exploited":"There is no known exploitation of GHSA-mj63-m3rc-8ppr in the wild and no public exploit code.","fix":"Upgrade league/commonmark to 2.9.0 or later.","what":"GHSA-mj63-m3rc-8ppr is a denial of service vulnerability in league/commonmark, published on 6 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-mj63-m3rc-8ppr and fix it if it is affected.\n\nWhat it is: GHSA-mj63-m3rc-8ppr is a denial of service vulnerability in league/commonmark, published on 6 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-mj63-m3rc-8ppr in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- league/commonmark (Packagist): affected from 2.0.0; fixed in 2.9.0\n- league/commonmark (Packagist): affected from 2.0.0; fixed in 2.9.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-mj63-m3rc-8ppr/ (Markdown: https://insights.sbomify.com/GHSA-mj63-m3rc-8ppr/index.md)","id":"GHSA-mj63-m3rc-8ppr","markdown":"https://insights.sbomify.com/GHSA-mj63-m3rc-8ppr/index.md","name":"GHSA-mj63-m3rc-8ppr","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"workaround","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"PHP Markdown library","requires_auth":"none","summary":"Attackers can cause denial of service via memory exhaustion by submitting deeply nested Markdown to applications using the opt-in XML renderer.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n\n`XmlRenderer` pretty-prints XML by emitting depth-proportional indentation whitespace for **every** opening and closing tag. For a tree of depth n, the indentation alone sums to **O(n²)** bytes of output (and corresponding memory), reachable through `MarkdownToXmlConverter` — e.g. `str_repeat('\u003e ', $depth) . \"x\\n\"`, a single line of nested blockquotes — or through a direct `XmlRenderer::renderDocument()` call on an attacker-influenced AST.\n\nThis affects applications that convert untrusted Markdown to XML, which is an **opt-in** output path. The parser's `max_nesting_level` bounds the depth of *parser-created* trees, but its default is high enough to reach damaging sizes, can be raised by the host application, and does not constrain custom or programmatically built ASTs handed straight to the renderer. The result is a memory / output-size amplification rather than a hard crash, which is why this issue is rated **Medium** rather than High. No confidentiality or integrity impact. XML rendering was introduced in 2.0.0 (first shipped in 2.0.0-beta1, June 2021) and has emitted depth-proportional indentation ever since, so all 2.x releases are affected (verified against 2.8.x, clean upstream `1902f60f`). 1.x has no XML renderer and is not affected.\n\n### Workarounds\n\nApplications converting untrusted Markdown to XML should:\n\n- **Lower `max_nesting_level`** to a conservative value appropriate to expected content, so the parser refuses to build extremely deep trees. This is the most direct lever for parser-produced ASTs, but does not protect trees built programmatically and passed straight to `XmlRenderer`.\n- **Cap input size before conversion**, since the amplification is driven by input-proportional depth.\n- **Constrain XML consumers** with memory / output-size limits (and streaming or size caps on any downstream XML parser or storage) so one request cannot allocate unbounded output.\n- **Prefer HTML rendering** for untrusted content where XML is not strictly required — the HTML renderer does not emit depth-proportional indentation and is not subject to this amplification.","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"league/commonmark: Denial of service via deeply nested XML output","id":"GHSA-mj63-m3rc-8ppr","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":["2.9.0"],"introduced":["2.0.0"],"last_affected":[],"package":"league/commonmark","purl":null,"source":"GHSA-mj63-m3rc-8ppr"},{"ecosystem":"Packagist","fixed":["2.9.0"],"introduced":["2.0.0"],"last_affected":[],"package":"league/commonmark","purl":"pkg:composer/league/commonmark","source":"GHSA-mj63-m3rc-8ppr"}],"products":null,"published":"2026-08-06","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can cause denial of service via memory exhaustion by submitting deeply nested Markdown to applications using the opt-in XML renderer.","url":"https://insights.sbomify.com/GHSA-mj63-m3rc-8ppr/"}