# CVE-2026-142223: AngleSharp before 1.8.6 Mutation XSS via HtmlMarkupFormatter Attribute Serialization

Source: https://aplosec.si/cve/CVE-2026-142223/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-142223

Low 2.3 · Reported · Fixed in 1.8.6 · CWE-79 · NuGet

# AngleSharp before 1.8.6 Mutation XSS via HtmlMarkupFormatter Attribute Serialization

CVE-2026-142223 · published 2026-12-02

In plain words: this type of bug lets someone run scripts in another person's browser (cross-site scripting, XSS). A fixed release is listed.

## Summary

CVE-2026-142223 affects AngleSharp (NuGet) < 1.8.6: Mutation XSS via HtmlMarkupFormatter Attribute Serialization (CWE-79). Fixed in 1.8.6. CVSS 4.0 base score 2.3 (Low), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).

AngleSharp before 1.8.6 contains a mutation cross-site scripting vulnerability in HtmlMarkupFormatter.WriteAttributeValue, which writes less-than and greater-than characters unescaped in serialized attribute values. Attackers can embed </noscript> followed by an img element with an onerror handler in a noscript child attribute, executing script when browsers parse the re-serialized output.

## Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

## Remediation

Upgrade AngleSharp to 1.8.6 or later. Releases in the affected range (< 1.8.6) are vulnerable. See the linked advisory for details on affected release lines.

## Timeline

- 2026-12-02 CVE published

## References

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/anglesharp-before-1.8.6-mutation-xss-via-htmlmarkupformatter-attribute-serialization](https://www.vulncheck.com/advisories/anglesharp-before-1.8.6-mutation-xss-via-htmlmarkupformatter-attribute-serialization)

- [Vulnerable codehttps://github.com/AngleSharp/AngleSharp/blob/v1.8.5/src/AngleSharp/Html/HtmlMarkupFormatter.cs#L130-L144](https://github.com/AngleSharp/AngleSharp/blob/v1.8.5/src/AngleSharp/Html/HtmlMarkupFormatter.cs#L130-L144)

- [Fix commithttps://github.com/AngleSharp/AngleSharp/commit/86d09cdc7fa45f8739fc5892bbca4c1a04be6dae](https://github.com/AngleSharp/AngleSharp/commit/86d09cdc7fa45f8739fc5892bbca4c1a04be6dae)

- [Releasehttps://github.com/AngleSharp/AngleSharp/releases/tag/v1.8.6](https://github.com/AngleSharp/AngleSharp/releases/tag/v1.8.6)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142223](https://www.cve.org/CVERecord?id=CVE-2026-142223)

- [NVD recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-142223](https://nvd.nist.gov/vuln/detail/CVE-2026-142223)

**Severity:** Low 2.3 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-142223)

**Package:** AngleSharp

**Ecosystem:** NuGet

**Affected:** < 1.8.6

**Fixed:** 1.8.6

**Weakness:** CWE-79

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder
