
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-71478 is a Cross-Site Scripting (XSS) vulnerability in league/commonmark, a PHP library for parsing and rendering CommonMark Markdown. The vulnerability affects versions >= 1.5.0 and <= 2.8.3, and allows attackers to bypass the AttributesExtension's href/src unsafe-link filter by embedding control bytes (tab, carriage return, line feed, or leading C0 control characters) in javascript: URLs. Browsers discard these control bytes before parsing the URL scheme, causing them to execute the JavaScript even when allow_unsafe_links => false is configured. The vulnerability was reported by TungNGo02, published to the GitHub Advisory Database on August 6, 2026, and carries a CVSS v3.1 base score of 6.1 (Medium) (Github Advisory, Security Advisory).
The root cause lies in RegexHelper::isLinkPotentiallyUnsafe() in src/Util/RegexHelper.php, which uses an anchored-prefix regex (/^(?:javascript|vbscript|file|data):/i) to detect dangerous URL schemes without first normalizing the input string. Two bypass variants exist: (1) embedding ASCII TAB (0x09), CR (0x0D), or LF (0x0A) within the scheme (e.g., java\tscript:alert(1)), which browsers strip per WHATWG URL Standard step 3; and (2) prepending a leading C0 control character (e.g., \x01javascript:alert(1)), which browsers strip per step 1 of the same algorithm. The AttributesExtension's attribute-value grammar (PARTIAL_DOUBLEQUOTEDVALUE = '"[^"]*"') accepts any byte except " inside quotes, including raw control bytes, and parseAttributes() only trims the default PHP charlist — so a leading \x01 survives into the safety check. Unlike the core Markdown link-destination path (which percent-encodes control bytes before the safety check), the Attributes extension's href/src handling has no equivalent normalization step. The vulnerability is classified as CWE-79 (XSS), CWE-86 (Improper Neutralization of Invalid Characters in Identifiers), and CWE-692 (Incomplete Denylist to XSS) (Security Advisory, Github Advisory).
Successful exploitation enables stored or reflected XSS in applications that render user-supplied Markdown with the AttributesExtension enabled. An attacker can steal session cookies, perform account takeover, execute arbitrary JavaScript in a victim's browser session, and potentially pivot to further attacks within the application's security scope. The scope is marked as "Changed" in the CVSS scoring, reflecting that the impact extends beyond the vulnerable component to the victim's browser context. Availability is not directly impacted, but confidentiality and integrity are both affected at a low level per the CVSS assessment (Github Advisory).
No public exploit code or in-the-wild exploitation has been reported as of the advisory publication date. The EPSS score is 0.0, indicating very low current exploitation probability, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires no privileges and no special configuration beyond the commonly-used AttributesExtension being enabled, but does require user interaction (a victim must click the malicious link). The attack complexity is low, as the bypass technique is straightforward and well-documented in the advisory (Github Advisory, Security Advisory).
league/commonmark versions >= 1.5.0 and <= 2.8.3 with the AttributesExtension enabled and allow_unsafe_links => false configured, and that renders user-supplied Markdown.LinkRenderer from overwriting the attribute-supplied href) combined with an obfuscated javascript: URL in the attribute block. Example using a literal TAB (0x09) byte:[Click me](javascript:alert(0)){href="java\tscript:alert(document.cookie)"}href value, resolves javascript:alert(document.cookie), and executes the script in the victim's session.href or src attribute values in {...} attribute blocks; patterns like java\tscript:, java\nscript:, java\rscript:, or \x01javascript: in stored content.{href="java[TAB]script:..."}); these may appear as unusual whitespace or non-printable characters in content fields.The fix is available in league/commonmark version 2.9.0, released August 3, 2026. The patch normalizes the URL in RegexHelper::isLinkPotentiallyUnsafe() by stripping ASCII tab/newline characters and left-trimming C0 control characters before applying the unsafe-protocol regex, mirroring the WHATWG URL parser's own normalization. Upgrade via Composer: composer require league/commonmark:^2.9.0. No configuration-based workaround exists for affected versions — even the documented hardening setting (allow_unsafe_links => false) is bypassed by this vulnerability. Applications that cannot upgrade immediately should consider disabling the AttributesExtension entirely or sanitizing user-supplied Markdown with an additional HTML sanitizer before rendering (Security Advisory, Release 2.9.0, Patch Commit).
The vulnerability was responsibly disclosed by researcher TungNGo02 and acknowledged by maintainer Colin O'Dell (colinodell), who released the fix in version 2.9.0. The advisory notes this is a sibling gap to CVE-2025-46734 (GHSA-3527-qv2q-pfvx), which was fixed in v2.7.0 but did not address control-byte normalization. The 2.9.0 release also addressed five denial-of-service vulnerabilities, with special thanks given to GrahamCampbell and TungNGo02 for responsible disclosure (Release 2.9.0, Security Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."