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.
Published: 2026-07-16
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

YAML::Syck versions before 1.47 contain a heap use‑after‑free that occurs when an anchor name is reused as an anchors‑table key in syck_hdlr_add_anchor. When the node carrying that anchor is freed, the shared key is also freed, and a subsequent anchor redefinition uses st_strcmp to compare against freed memory, resulting in a use‑after‑free that can corrupt heap memory. The CVE description states that this flaw is reached on the default Load path when an application loads untrusted YAML documents. The flaw is thus a memory‑corruption vulnerability without an explicit claim of arbitrary code execution.

Affected Systems

Vendor Toddr provides the YAML::Syck library. All releases prior to version 1.47 are affected. Applications that embed Perl with YAML::Syck below this version and that accept untrusted YAML input at runtime are vulnerable. Based on the description, the vulnerability is triggered when an application uses the default Load or LoadFile path to parse untrusted YAML.

Risk and Exploitability

The CVSS score of 7.8 classifies this issue as high severity. The EPSS score is less than 1 %, indicating a very low current exploitation probability in the wild. The vulnerability is not listed in the CISA KEV catalog. Based on the description, the likely attack vector is an application supplying a malicious YAML document that redefines an anchor, triggering the use‑after‑free and potentially corrupting program memory.

Generated by OpenCVE AI on July 31, 2026 at 01:13 UTC.

Remediation

Vendor Solution

Upgrade to YAML-Syck 1.47 or later.


OpenCVE Recommended Actions

  • Upgrade to YAML‑Syck 1.47 or later to remove the use‑after‑free bug.
  • Avoid loading untrusted YAML documents with Load or LoadFile; consider using safer parsing mechanisms or sandboxing the parsing process.
  • Validate or sanitize input YAML before parsing to prevent anchor redefinitions or other malformed constructs that could trigger the flaw.

Generated by OpenCVE AI on July 31, 2026 at 01:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 18 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

threat_severity

Moderate


Fri, 17 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 16 Jul 2026 23:45:00 +0000

Type Values Removed Values Added
First Time appeared Toddr
Toddr yaml::syck
Vendors & Products Toddr
Toddr yaml::syck

Thu, 16 Jul 2026 22:15:00 +0000

Type Values Removed Values Added
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.
Title 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
Weaknesses CWE-416
References

Subscriptions

Toddr Yaml::syck
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-07-17T13:07:23.790Z

Reserved: 2026-06-23T18:02:32.995Z

Link: CVE-2026-57076

cve-icon Vulnrichment

Updated: 2026-07-17T03:02:27.529Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-16T21:40:59Z

Links: CVE-2026-57076 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T01:15:18Z

Weaknesses