Junglewise Threat Intelligence

CVE-2026-57076: YAML::Syck heap use-after-free in anchor key handling

CVE-2026-57076 · Severity: info · CVSS 5.3 · Published 2026-07-16

Technologies: TODDR (CPAN) YAML-Syck.

Executive brief

YAML::Syck is a Perl library used to process YAML data, a common format for configuration files and data exchange. A flaw in how it handles 'anchors' (a way to label and reuse data within a document) allows a specially crafted file to cause the library to read memory that has already been freed. This could potentially lead to information disclosure or application instability when processing untrusted data.

Technical details

A heap use-after-free vulnerability exists in the bundled libsyck library within YAML::Syck. The root cause is improper memory management in 'handler.c' where an anchor name string is shared between a node object and the parser's internal anchors table. When a node is freed, its associated anchor string is also deallocated, but a pointer to that memory remains in the anchors table. If a subsequent anchor redefinition occurs, the parser attempts to compare the new anchor against the freed memory using 'st_strcmp'. This is reachable via the default 'Load' or 'LoadFile' paths when processing untrusted YAML documents. The issue was fixed in version 1.47 by ensuring the anchors table maintains its own private copy of key strings.

Affected products

  • TODDR (CPAN) YAML::Syck < 1.47

Timeline

  • 2026-07-13: patched: Fix committed to repository
  • 2026-07-16: disclosed: CVE published via CPANSec and NVD

References