CVE-2021-27918Infinite Loop in GO

Severity
7.5HIGHNVD
EPSS
0.0%
top 93.35%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedMar 11
Latest updateJul 9

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.

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HExploitability: 3.9 | Impact: 3.6

Affected Packages4 packages

NVDgolang/go1.16.01.16.1+1
Palo Altopaloalto/pan-os
CVEListV5redhat/openshift_serverlessFixed in Serverless 1.17.0

🔴Vulnerability Details

6
GHSA
GHSA-x358-pmcq-q2x3: It was found that the CVE-2021-27918, CVE-2021-31525 and CVE-2021-33196 have been incorrectly mentioned as fixed in RHSA for Serverless 12022-08-27
CVEList
CVE-2021-3703: It was found that the CVE-2021-27918, CVE-2021-31525 and CVE-2021-33196 have been incorrectly mentioned as fixed in RHSA for Serverless 12022-08-26
GHSA
GHSA-8mmp-c685-53vw: encoding/xml in Go before 12022-05-24
OSV
Infinite loop when decoding inputs in encoding/xml2022-02-17
OSV
CVE-2021-27918: encoding/xml in Go before 12021-03-11

📋Vendor Advisories

6
Palo Alto
PAN-SA-2025-0012 Informational Bulletin: OSS CVEs Fixed in PAN-OS2025-07-09
Red Hat
serverless: incomplete fix for CVE-2021-27918 / CVE-2021-31525 / CVE-2021-331962021-09-13
Red Hat
serverless: incomplete fix of CVE-2021-279182021-08-18
Red Hat
golang: encoding/xml: infinite loop when using xml.NewTokenDecoder with a custom TokenReader2021-03-10
Microsoft
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 D2021-03-09
CVE-2021-27918 — Infinite Loop in Golang GO | cvebase