Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2021-27918

golang: encoding/xml: infinite loop when using xml.NewTokenDecoder with a custom TokenReader

Overview

Published
11 Mar 2021
Modified
17 Jun 2026
High CVE
2 Registry packages
137 OS packages
8 Linux distributions
Yes Fix available

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.

Source: OX vulnerability database

Severity

7.5 · HIGH

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weakness: CWE-835

Affected packages · 2

Packages affected by CVE-2021-27918
EcosystemPackageVulnerableFixed in
Bitnami golang <1.15.9>=1.16.0, <1.16.1 1.15.91.16.1
Go stdlib <1.15.9>=1.16.0-0, <1.16.1 1.15.91.16.1

Open a package to see all its vulnerabilities.

Operating systems · 58 fixes

Azure Linux 1 release · 1 package

fixed 1
python-tensorboard
Azure Linux fixes for CVE-2021-27918
ReleasePackageFixed in
3.0 python-tensorboard 0:2.16.2-2.azl3

Oracle Linux 2 releases · 19 packages

fixed 36
flannel kubernetes-cni kubernetes-cni-plugins kata-image kata-agent kata +13
Oracle Linux fixes for CVE-2021-27918
ReleasePackageFixed in
7 flannel 0.12.0-2.el7
7 kubernetes-cni 0.8.0-3.el7
7 kubernetes-cni-plugins 0.8.7-2.el7
7 kata-image 1.11.5-2.2.ol7_202104281557
7 kata-agent +4 1.11.5-2.el7
7 kata 1.11.5-4.el7

30 more rows

Photon OS 1 release · 1 package

fixed 1
go
Photon OS fixes for CVE-2021-27918
ReleasePackageFixed in
4.0 go 1.16.2-1.ph4

Red Hat 5 releases · 8 packages

affected 2 wont fix 4 eol 1 fixed 2
heketi golang buildah atomic-openshift openshift go-toolset +2
Red Hat fixes for CVE-2021-27918
ReleasePackageFixed in
heketi +2 affected
golang +9 wont fix
7 golang +4 affected
7 buildah +47 eol
7 atomic-openshift +16 wont fix
8 openshift +13 wont fix

3 more rows

alpine 4 releases · 1 package

fixed 4
go
alpine fixes for CVE-2021-27918
ReleasePackageFixed in
3.22 go 1.16.2-r0
3.23 go 1.16.2-r0
3.24 go 1.16.2-r0
edge go 1.16.2-r0

debian 3 releases · 3 packages

affected 2 fixed 1
golang-1-11 golang-1-15 golang-1-7
debian fixes for CVE-2021-27918
ReleasePackageFixed in
10 golang-1-11 affected
11 golang-1-15 1.15.9-1
9 golang-1-7 +1 affected

openSUSE 1 release · 2 packages

fixed 2
go1-15 go1-16
openSUSE fixes for CVE-2021-27918
ReleasePackageFixed inAdvisory
Tumbleweed go1-15 +2 1.15.15-1.2 openSUSE-SU-2024:10808-1
Tumbleweed go1-16 +2 1.16.8-1.1 openSUSE-SU-2024:10809-1

rocky 1 release · 2 packages

fixed 2
go-toolset delve
rocky fixes for CVE-2021-27918
ReleasePackageFixed in
8 (go-toolset:rhel8) go-toolset +7 1.15.14-1.module+el8.4.0+632+4dba2916
8 (go-toolset:rhel8) delve 1.5.0-2.module+el8.4.0+396+d2d16ae3

References

Show all 23 references

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.