Skip to content

encoding/xml: infinite loop when using xml.NewTokenDecoder with a custom TokenReader [Go 1.15] #44914

Closed
@katiehockman

Description

@katiehockman

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.

Thanks to Sam Whited for reporting this issue.
This issue is CVE-2021-27918.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions