CVE-2020-29511
Go vulnerability analysis and mitigation

Overview

The encoding/xml package in Go (all versions) contains a vulnerability (CVE-2020-29511) where it fails to correctly preserve the semantics of element namespace prefixes during tokenization round-trips. This vulnerability was discovered and reported by Mattermost, Inc. in December 2020 (NIST NVD, Mattermost Advisory).

Technical details

The vulnerability allows attackers to craft XML inputs that behave inconsistently during different stages of processing in affected downstream applications. The issue specifically affects how namespace prefixes on XML elements are handled during xml.Decoder and xml.Encoder implementations. The vulnerability has received a CVSS v3.1 base score of 5.6 (Medium) with vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L, though initially it was rated higher at 9.8 (Critical) (NIST NVD).

Impact

The vulnerability can cause mutations during encoding round-trips, leading to incorrect or conflicting decisions in affected applications. For example, in SAML implementations, this could allow an attacker to have a SAML Assertion interpreted as signed while reading values from an unsigned part of the same document, potentially leading to authentication bypass and privilege escalation within the SAML Service Provider scope (Mattermost Advisory).

Exploitability

The vulnerability requires network access and high attack complexity. Equivalent lookups within an XML document can return different results during different stages of the document's lifecycle, and validation of XML document structure can succeed or fail depending on the number of encoding round-trips it has undergone (Mattermost Advisory).

Mitigation and workarounds

A workaround has been provided through the github.com/mattermost/xml-roundtrip-validator module, which can detect unstable constructs in XML documents, including unstable element namespace prefixes. It is recommended to invoke the validator on all untrusted markup and fail early if it returns an error (Mattermost Advisory).

Community reactions

The vulnerability has been acknowledged by multiple organizations and vendors. NetApp has issued an advisory (NTAP-20210129-0006) addressing this vulnerability in their products. Notably, upstream Go developers have indicated they likely won't fix this issue, shifting responsibility to SAML packages (Ubuntu Security).

Additional resources


SourceThis report was generated using AI

Related Go vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2023-54365HIGH8.7
  • Go logoGo
  • cpe:2.3:a:golang:go
NoYesJun 23, 2026
CVE-2026-39822HIGH7.8
  • Go logoGo
  • clusteradm-fips
NoYesJul 08, 2026
CVE-2026-42504HIGH7.5
  • Go logoGo
  • crossplane-provider-aws-appflow
NoYesJun 02, 2026
CVE-2026-42505MEDIUM5.3
  • Go logoGo
  • crossplane-provider-aws-oam-fips
NoYesJul 08, 2026
CVE-2026-42507MEDIUM5.3
  • Go logoGo
  • container-tools:rhel8::skopeo
NoYesJun 02, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management