{"id":"CVE-2021-27918","aliases":["CVE-2021-27918","GO-2021-0234","BIT-GOLANG-2021-27918"],"related":[],"kind":"vulnerability","state":"published","title":"Infinite loop when decoding inputs in encoding/xml","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"go"},{"lang":"es","text":"encoding/xml en Go versiones anteriores a 1.15.9 y versiones 1.16.x anteriores a 1.16.1, presenta un bucle infinito si un TokenReader personalizado (para xml.NewTokenDecoder) devuelve EOF en medio de un elemento.&#xa0;Esto puede ocurrir en el método Decode, DecodeElement o Skip","source":"nvd"}],"published":"2021-03-10T23:54:43.000Z","modified":"2026-09-08T08:47:46.714Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-835"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.15.9"},{"type":"semver","introduced":"1.16.0-0","status":"affected","fixed":"1.16.1"}],"ecosystem":"Go","package":"stdlib","purl":"pkg:golang/stdlib","source":"go"},{"ranges":[{"status":"affected","fixed":"1.15.9"},{"status":"affected","introduced":"1.16.0","fixed":"1.16.1"}],"vendor":"golang","product":"go","cpe":"cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.15.9"},{"type":"semver","introduced":"1.16.0","status":"affected","fixed":"1.16.1"}],"ecosystem":"Bitnami","package":"golang","purl":"pkg:bitnami/golang","source":"bitnami"}],"references":[{"url":"https://groups.google.com/g/golang-announce/c/MfiLYjG-RAw","tags":["advisory","mailing-list","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","go","nvd","bitnami"]},{"url":"https://security.gentoo.org/glsa/202208-02","tags":["advisory","third-party-advisory","vendor-advisory","x-refsource-gentoo","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://go.dev/cl/300391","tags":["fix"],"sources":["go"]},{"url":"https://go.googlesource.com/go/+/d0b79e3513a29628f3599dc8860666b6eed75372","tags":["fix"],"sources":["go"]},{"url":"https://go.dev/issue/44913","tags":["report"],"sources":["go"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27918","tags":["web"],"sources":["bitnami"]}],"credits":["Sam Whited"],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-27918","url":"https://www.cve.org/CVERecord?id=CVE-2021-27918","licence":"CVE Terms of Use","modified":"2024-08-03T21:33:16.406Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2021-0234","url":"https://pkg.go.dev/vuln/GO-2021-0234","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-27918","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27918","licence":"Public domain","modified":"2026-06-17T03:45:36.970Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-GOLANG-2021-27918","url":"https://osv.dev/vulnerability/BIT-GOLANG-2021-27918","licence":"Apache-2.0","modified":"2026-09-08T08:47:46.714Z"}],"updatedAt":"2026-11-25T22:58:00.233Z","epss":{"score":0.02474,"percentile":0.84976,"date":"2026-12-01T12:00:22.000Z"}}