PT-2026-68812 · Packagist · League/Commonmark
CVE-2026-71478
·
Published
2026-08-06
·
Updated
2026-08-07
CVSS v3.1
6.1
Medium
| Vector | AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Name of the Vulnerable Software and Affected Versions
league/commonmark versions 1.5.0 through 2.8.3
Description
The
AttributesExtension in the library contains a flaw where the href and src unsafe-link filters can be bypassed. This occurs because the filterAttributes() function and the isLinkPotentiallyUnsafe() check do not normalize control bytes before validating the URL scheme. An attacker can embed control bytes—such as tabs (0x09), carriage returns (0x0D), line feeds (0x0A), or leading C0 control characters—within a javascript: URL. Since browsers discard these characters before parsing the scheme, the script is executed even when the allow unsafe links setting is disabled.Technical details include:
- API Endpoints: Not applicable.
- Vulnerable Parameters or Variables:
hrefandsrcattributes within theAttributesExtension. - Function Names:
filterAttributes()andisLinkPotentiallyUnsafe().
Recommendations
Update league/commonmark to version 2.9.0.
As a temporary mitigation, restrict the use of the
AttributesExtension or avoid allowing untrusted users to provide attribute values for href and src until the update is applied.Exploit
Fix
XSS
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
League/Commonmark