Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| AngleSharp | AngleSharp | 0 <1.8.6 | — |
References
- https://github.com/AngleSharp/AngleSharp/blob/v1.8.5/src/AngleSharp/Html/HtmlMarkupFormatter.cs#L130-L144
- https://github.com/AngleSharp/AngleSharp/commit/86d09cdc7fa45f8739fc5892bbca4c1a04be6dae
- https://github.com/AngleSharp/AngleSharp/releases/tag/v1.8.6
- https://www.vulncheck.com/advisories/anglesharp-before-1.8.6-mutation-xss-via-htmlmarkupformatter-attribute-serialization