Skip to content

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

Closed

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.

Activity

  1. added this to the Go1.17 milestone on Mar 10, 2021
  2. gopherbot commented on Mar 10, 2021

    @gopherbot
    Contributor

    Change https://golang.org/cl/300391 mentions this issue: encoding/xml: prevent infinite loop while decoding

  3. added a commit that references this issue on Mar 19, 2021
    d21be68
  4. locked and limited conversation to collaborators on Mar 10, 2022
  5. added a commit that references this issue on Apr 29, 2024
    d0b79e3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions