CVE-2021-27918

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

Published Mar 10, 2021 CVSS 3.1 · 7.5 High EPSS 2.5% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2021-14641 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.
History
Type Values Removed Values Added
Metrics epss

{'score': 0.00052}

epss

{'score': 0.00054}

Type Values Removed Values Added
Metrics epss

{'score': 0.00026}

epss

{'score': 0.00052}

Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Aug 3, 2024, 9:33 PM
Reserved
Mar 3, 2021, 12:00 AM
Status
Modified
Published
Mar 11, 2021, 12:15 AM
Modified
Jun 17, 2026, 3:45 AM
Severity
Moderate
Public date
Mar 10, 2021, 12:00 AM