Advisory Database
  • Advisories
  • Dependency Scanning
  1. nuget
  2. ›
  3. AngleSharp
  4. ›
  5. CVE-2026-54570

CVE-2026-54570: AngleSharp HTML5 Spec Compliance: mXSS via annotation-xml HTML Integration Point Bypass

July 17, 2026

The HTML specification requires that a MathML <annotation-xml> element with encoding="text/html" or encoding="application/xhtml+xml" is treated as an HTML integration point. Content inside it must be parsed as HTML, not MathML.

AngleSharp does not implement this correctly. As a result, the parser produces a DOM tree that differs from what a browser will build (different namespaces if encoding="text/html" is not treated) when given the same serialized output. Two bugs combine to make this exploitable:

  • Missing HtmlTip flag: MathAnnotationXmlElement is never assigned NodeFlags.HtmlTip based on its encoding attribute, so the Consume() dispatch always routes tokens to Foreign() instead of Home() (HTML mode).
  • Unescaped < > in attribute values: HtmlMarkupFormatter.WriteAttributeValue() does not escape < or > characters, only & and “. This allows injected markup to break out of attribute values on re-parse. See Escape “<” and “>” in attributes when serializing HTML #6235

References

  • github.com/AngleSharp/AngleSharp/releases/tag/1.5.0
  • github.com/AngleSharp/AngleSharp/security/advisories/GHSA-pgww-w46g-26qg
  • github.com/advisories/GHSA-pgww-w46g-26qg
  • nvd.nist.gov/vuln/detail/CVE-2026-54570

Code Behaviors & Features

Detect and mitigate CVE-2026-54570 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.5.0

Fixed versions

  • 1.5.0

Solution

Upgrade to version 1.5.0 or above.

Impact 6.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

Source file

nuget/AngleSharp/CVE-2026-54570.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:19:00 +0000.