Perl versions before 5.40.5-RC1, from 5.41.0 before 5.42.3-RC1, from 5.43.0 before 5.43.11 have an integer overflow in S_measure_struct leading to an out-of-bounds heap read in pack and unpack.
S_measure_struct adds each item's size times its repeat count to a running total with no overflow check, so a large repeat count in a pack or unpack template wraps the signed SSize_t total negative. The @, X, and x position codes then guard their moves with a signed length comparison that passes when the length is negative, advancing the buffer pointer out of bounds.
A template derived from untrusted input can read heap memory past the buffer and return it to the caller.
{
"cna_assigner": "CPANSec",
"cwe_ids": [
"CWE-125",
"CWE-190"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57432.json"
}{
"cpe": "cpe:2.3:a:perl:perl:*:*:*:*:*:*:*:*",
"extracted_events": [
{
"introduced": "0"
},
{
"last_affected": "5.43.10"
}
],
"source": [
"CPE_RANGE",
"REFERENCES"
]
}
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-57432.json"
[
{
"deprecated": false,
"digest": {
"function_hash": "25072063771270511445671413082026489545",
"length": 1564
},
"id": "CVE-2026-57432-7dacdb06",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/perl/perl5/commit/5f7eb6bbbe0510964e3fb1d6bb691e5445913e55",
"target": {
"file": "pp_pack.c",
"function": "S_measure_struct"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"29903863876335406943443366041508711239",
"69081311608836401256429370573162305475",
"82901968090413512737454453188025013684",
"188272959908224046124473974834687995312"
],
"threshold": 0.9
},
"id": "CVE-2026-57432-a8660b53",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/perl/perl5/commit/5f7eb6bbbe0510964e3fb1d6bb691e5445913e55",
"target": {
"file": "pp_pack.c"
}
}
]
"2026-09-10T08:13:09Z"