Infinite loop Affecting std/encoding/xml package, versions <1.15.9>=1.16.0-0 <1.16.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Social Trends
EPSS
2.47% (84th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-STDENCODINGXML-14545535
  • published6 Jan 2026
  • disclosed17 Feb 2022
  • creditSam Whited

Introduced: 17 Feb 2022

CVE-2021-27918  (opens in a new tab)
CWE-835  (opens in a new tab)

How to fix?

Upgrade std/encoding/xml to version 1.15.9, 1.16.1 or higher.

Overview

std/encoding/xml is a Go standard library package std/encoding/xml

Affected versions of this package are vulnerable to Infinite loop.

Go Vulnerability Report:
The Decode, DecodeElement, and Skip methods of an xml.Decoder provided by xml.NewTokenDecoder may enter an infinite loop when operating on a custom xml.TokenReader which returns an EOF in the middle of an open XML element.

CVSS Base Scores

version 4.0
version 3.1