Description
AngleSharp is a .NET library for parsing angle bracket based hyper-texts. Prior to 1.5.0, MathAnnotationXmlElement in AngleSharp/Mathml/Dom/Internal/MathAnnotationXmlElement.cs is not treated as an HTML integration point when its encoding attribute is text/html or application/xhtml+xml, causing Consume in AngleSharp/Html/Parser/HtmlDomBuilder.cs to route tokens through foreign-content parsing instead of HTML parsing. A sanitizer can therefore observe a different DOM from the browser that reparses the serialized output. An attacker can combine this namespace differential with markup-breaking characters in an attribute value so that an element hidden from the sanitizer becomes active script-capable HTML after browser reparse, resulting in mutation cross-site scripting. This issue is fixed in version 1.5.0.
Published: 2026-08-18
Score: 6.9 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A flaw in the AngleSharp library allows a MathAnnotationXmlElement to be treated as a foreign-content element rather than an HTML integration point when its encoding attribute is text/html or application/xhtml+xml. As a result, the library’s parsing routine processes certain tokens through foreign‑content parsing instead of normal HTML parsing. This divergence creates a condition where a sanitizer can see a different DOM than the browser does after recomposition, enabling an attacker to embed markup that bypasses the sanitizer. The attacker can combine this namespace mismatch with markup‑breaking characters embedded in an attribute value to create an element that is invisible to the sanitizer but becomes a legitimate, script‑capable element when the browser reparses it, yielding a mutation cross‑site scripting vulnerability.

Affected Systems

The vulnerability affects the AngleSharp .NET library for versions older than 1.5.0. Vendors and developers using AngleSharp to parse user provided HTML or MathML before the 1.5.0 release are impacted. The issue is fixed and no longer present in the 1.5.0 release and later.

Risk and Exploitability

The CVSS score is 6.9, indicating a moderate severity. No EPSS score is available and the vulnerability is not listed in the CISA KEV catalog. The likely exploitation scenario involves an application that parses input through AngleSharp and can supply specially crafted markup. While the exploit does not rely on remote code execution, it can compromise confidentiality and integrity by executing malicious scripts in the client’s context. The moderate score reflects the limited scope of the vulnerability and the requirement that the application processes untrusted content with AngleSharp.

Generated by OpenCVE AI on August 18, 2026 at 19:53 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade AngleSharp to version 1.5.0 or later, as the vulnerability is fixed in that release.
  • If upgrading is not immediately possible, remove or disable any usage of MathAnnotationXmlElement with text/html or application/xhtml+xml encodings, or reconfigure the parser to treat it strictly as an HTML integration point.
  • Implement additional sanitization outside of AngleSharp for all content that will be parsed, ensuring that script tags and dangerous attributes are removed before the input reaches the library.

Generated by OpenCVE AI on August 18, 2026 at 19:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-pgww-w46g-26qg AngleSharp HTML5 Spec Compliance: mXSS via annotation-xml HTML Integration Point Bypass
History

Tue, 18 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 18 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
Description AngleSharp is a .NET library for parsing angle bracket based hyper-texts. Prior to 1.5.0, MathAnnotationXmlElement in AngleSharp/Mathml/Dom/Internal/MathAnnotationXmlElement.cs is not treated as an HTML integration point when its encoding attribute is text/html or application/xhtml+xml, causing Consume in AngleSharp/Html/Parser/HtmlDomBuilder.cs to route tokens through foreign-content parsing instead of HTML parsing. A sanitizer can therefore observe a different DOM from the browser that reparses the serialized output. An attacker can combine this namespace differential with markup-breaking characters in an attribute value so that an element hidden from the sanitizer becomes active script-capable HTML after browser reparse, resulting in mutation cross-site scripting. This issue is fixed in version 1.5.0.
Title AngleSharp: HTML5 Spec Compliance: mXSS via annotation-xml HTML Integration Point Bypass
Weaknesses CWE-80
References
Metrics cvssV3_1

{'score': 6.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-18T19:27:44.943Z

Reserved: 2026-06-15T19:15:27.343Z

Link: CVE-2026-54570

cve-icon Vulnrichment

Updated: 2026-08-18T19:27:40.871Z

cve-icon NVD

Status : Received

Published: 2026-08-18T18:18:23.310

Modified: 2026-08-18T20:17:18.530

Link: CVE-2026-54570

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T20:00:04Z

Weaknesses
  • CWE-80

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