CVE-2021-27918
HIGH7.5EPSS 0.03%Infinite loop when decoding inputs in encoding/xml
Published: 2/17/2022Modified: 4/28/2026
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 packages (3)
- Bitnami/golangfrom 0, < 1.15.9, >= 1.16.0, < 1.16.1
- Debian/golang-1.15from 0, < 1.15.9-1
- Go/stdlibfrom 0, < 1.15.9, >= 1.16.0-0, < 1.16.1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | HIGH7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
References (7)
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2021-27918
- PATCHhttps://go.dev/cl/300391
- PATCHhttps://go.googlesource.com/go/+/d0b79e3513a29628f3599dc8860666b6eed75372
- REPORThttps://go.dev/issue/44913
- WEBhttps://groups.google.com/g/golang-announce/c/MfiLYjG-RAw
- WEBhttps://nvd.nist.gov/vuln/detail/CVE-2021-27918
- WEBhttps://security.gentoo.org/glsa/202208-02