Description |
+ |
Go's encoding/xml handles namespace prefixes on XML elements in a way that causes crafted markup to mutate during round-trips through the xml.Decoder and xml.Encoder implementations. Encoding and decoding using Go's encoding/xml can change the observed namespace as well as the observed local name of a maliciously crafted XML element. |
+ |
|
+ |
Affected applications include software that relies on XML integrity for security-sensitive decisions. Prominent examples of such applications include SAML and XML-DSig implementations. |
|
References |
+ |
https://github.com/mattermost/xml-roundtrip-validator/blob/master/advisories/unstable-elements.md |
+ |
https://github.com/mattermost/xml-roundtrip-validator |
|
Notes |
+ |
Workaround |
+ |
========== |
+ |
|
+ |
The github.com/mattermost/xml-roundtrip-validator module can detect unstable constructs in an XML document, including unstable element namespace prefixes. Invoking the validator on all untrusted markup and failing early if it returns an error can prevent these types of issue from being exploited in an otherwise affected application. |
|