CVE-2021-27918

published 10 Mar 2021 · updated 9 Sep 2026

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.

7.5HighCVSS 7.5EPSS 2%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. No fixed version is recorded.

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.

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2021-27918 severity on Zeptric[![CVE-2021-27918](https://zeptric.io/badge/cve/CVE-2021-27918.svg)](https://zeptric.io/cve/CVE-2021-27918)