What’s Vulnerable › Vulnerabilities
CVE-2021-27918
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-03-11 · updated 2026-06-17
- Weakness: CWE-835
Description
encoding/xml in Go before 1.15.9 and 1.16.x before 1.16.1 has an infinite loop if a custom TokenReader (for xml.NewTokenDecoder) returns EOF in the middle of an element. This can occur in the Decode, DecodeElement, or Skip method.
Affected products
- Go: before 1.15.9; from 1.16.0 before 1.16.1 — fixed in 1.15.9, 1.16.1
How to fix
Upgrade to a fixed version: Go 1.15.9, 1.16.1. Check the vendor advisory for mitigations.
References
- https://groups.google.com/g/golang-announce/c/MfiLYjG-RAw
- https://security.gentoo.org/glsa/202208-02
- https://groups.google.com/g/golang-announce/c/MfiLYjG-RAw
- https://security.gentoo.org/glsa/202208-02
Get alerted when CVE-2021-27918 or the next vulnerability affects your stack