lemaur/markdown
A Laravel/PHP package for converting Markdown into HTML, offering a straightforward API for rendering documentation, blog posts, and other content. Easy to integrate into Laravel applications with configurable Markdown rendering options.
league/commonmark version to 2.10.2, closing known advisories (quadratic-time and other DoS vectors, an on* attribute filter bypass in AttributesExtension, and a DisallowedRawHtml bypass). This directly informs a "upgrade now vs. schedule" decision for any product that renders untrusted or user-submitted Markdown (comments, docs, chat, CMS bodies, AI-generated content).DisallowedRawHtml and on* filter bypasses are the decision-relevant items — they map to stored-XSS-adjacent exposure and content-sanitisation guarantees, not just performance.Adopt when:
league/commonmark ecosystem without wiring it up yourself.Look elsewhere or pause when:
league/commonmark + this wrapper expose — go direct to the upstream library and own the config explicitly.league/commonmark 2.10.2 floor for other reasons; the constraint will block the upgrade, and you need a coordinated bump across all consumers of CommonMark in the app.Str::markdown-style call); Laravel's built-in helper may already cover it without an extra dependency.To executives: A routine but security-relevant patch. Version 4.0.2 raises the minimum version of the underlying Markdown parser to one that fixes several published vulnerabilities — including filter bypasses that matter for any surface where users can submit Markdown. There is no change to rendered output, no new features, and no breaking changes, so the cost is a dependency bump and a CI run. Recommendation: include it in the next maintenance release rather than a dedicated one; it is low-effort risk reduction, not a project.
To engineering: Upgrade leMaur/markdown to 4.0.2 and confirm league/commonmark resolves to ≥ 2.10.2 — check for any other package in the tree pinning an older CommonMark. Run the existing rendering test suite; expected diff is zero because output is unchanged. Note PHPUnit 13 support if your test matrix is moving. Flag the AttributesExtension on* filter bypass and DisallowedRawHtml bypass to whoever owns content sanitisation, since those are the items with a plausible user-facing impact if left unpatched.
How can I help you explore Laravel packages today?