CVE-2026-57076
JSON

7.8high

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

Severity
7.8high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.15% (higher than 4% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
CPANSec

Description

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.

Affected

Product or packageVersionsReported by
YAML-Syckbefore 1.47CVE List

Classification

CWE-416

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

Las versiones de YAML::Syck anteriores a la 1.47 para Perl permiten un uso después de liberación en el heap a través de un nombre de ancla reutilizado como clave de la tabla de anclas en syck_hdlr_add_anchor. En la libsyck incluida, un nombre de ancla asignado por syck_strndup se almacena tanto como node -> anchor, liberado cuando el nodo es liberado, como clave en la tabla de anclas del analizador. La liberación del nodo libera la clave compartida, y una posterior redefinición del ancla hace que st_delete compare con la clave liberada, por lo que st_strcmp lee memoria del heap liberada. Las anclas son una característica estándar de YAML y no requieren banderas especiales, por lo que esto se alcanza en la ruta de carga (Load) predeterminada. Cualquier llamador que ejecute Load o LoadFile en un documento no confiable que redefine un ancla alcanza la lectura de memoria liberada.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-57076 changed 2026-07-17CVE Terms of Use
NVDCVE-2026-57076 changed 2026-10-24Public domain