CVE-2020-29510CWE-115

The encoding/xml package in Go versions 1.15 and earlier does not correctly preserve the semantics of directives during tokenization round-trips, which allows…

Critical · published December 14, 2020

CVSS v3.1
9.8
EPSS
2%
Percentile
81.3
In the wild
Unconfirmed
What it is

🔥 A crafty input can confuse your application! The encoding/xml package in Go up to version 1.15 mismanages tokenization, allowing attackers to exploit it in sneaky ways during processing. ⚡ Picture a food order at a restaurant where the chef misinterprets your special request — you ask for no nuts, but somehow they include them in the sauce. This is similar to how the encoding/xml package mishandles directives, causing conflicting behavior that can lead to unexpected results in your application. An attacker could manipulate inputs to create conflicting behaviors at different stages of processing, leading to data leaks, application crashes, or even unauthorized access. This vulnerability could put your application's integrity at risk in absolutely devastating ways if exploited!

Put simply

Picture a food order at a restaurant where the chef misinterprets your special request — you ask for no nuts, but somehow they include them in the sauce. This is similar to how the encoding/xml package mishandles directives, causing conflicting behavior that can lead to unexpected results in your application. CVE-2020-29510 occurs because the encoding/xml package in Go fails to properly preserve directive semantics during tokenization round-trips, leading to potential inconsistencies in how inputs are processed downstream.

What to do

An attacker could manipulate inputs to create conflicting behaviors at different stages of processing, leading to data leaks, application crashes, or even unauthorized access. This vulnerability could put your application's integrity at risk in absolutely devastating ways if exploited! To protect yourself, upgrade to Go version 1.16 or later immediately! Ensure your applications are not using the vulnerable versions and review any XML processing logic to prevent unexpected behaviors. 🛡️ You've got this! By patching promptly, you’ll fortify your application against this vulnerability. 🚀

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.02072 · 81.3th percentile
Weakness
CWE-115 · Misinterpretation of Input
Published
2020-12-14T19:57Z
EPSS history
Timeline
  • 14 DEC 19:57Z
    The encoding/xml package in Go versions 1.15 and earlier does not correctly preserve the semantics of directives during tokenization round-trips, which allows…
    cvelistv5