CVE-2026-57076 PUBLISHED

YAML::Syck versions before 1.47 for Perl allow a heap use-after-free via an anchor name reused as an anchors-table key in syck_hdlr_add_anchor

Assigner: CPANSec
Reserved: 23.06.2026 Published: 16.07.2026 Updated: 17.07.2026

YAML::Syck versions before 1.47 for Perl allow a heap use-after-free via an anchor name reused as an anchors-table key in syck_hdlr_add_anchor.

In the bundled libsyck an anchor name allocated by syck_strndup is stored both as node->anchor, freed when the node is freed, and as the key in the parser's anchors table. Freeing the node frees the shared key, and a later anchor redefinition makes st_delete compare against the freed key, so st_strcmp reads freed heap memory. Anchors are a standard YAML feature and need no special flags, so this is reached on the default Load path.

Any caller that runs Load or LoadFile on an untrusted document that redefines an anchor reaches the read of freed memory.

Product Status

Vendor TODDR
Product YAML::Syck
Versions Default: unaffected
  • affected from 0 to 1.47 (excl.)

Solutions

Upgrade to YAML-Syck 1.47 or later.

References

Problem Types

  • CWE-416 Use After Free CWE