league/html-to-markdown is vulnerable to Cross-Site Scripting (XSS)
50
CVE Score
Medium
Cross-Site Scripting (XSS)
LinkConverter and ImageConverter build Markdown links and images by concatenating the element's href/src, title, and alt attribute values without escaping them. A double quote in title, a closing bracket in alt, or an unbalanced closing parenthesis in the URL ends the link or image syntax early, and the entity decoded remainder of the value is emitted as raw Markdown or HTML. HTML Purifier and the strip_tags/remove_nodes options do not stop this because the attribute value contains no tags before conversion runs. The fix escapes link and image text and destinations before they are written into the output.
Upgrade the league/html-to-markdown library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and the converted Markdown is later rendered to HTML by a renderer that allows raw HTML.
3.0.0 - 5.1.2
Fixed in 5.1.3league/html-to-markdown is vulnerable to Cross-Site Scripting (XSS) in versions 3.0.0 - 5.1.2.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.