{"id":"CVE-2026-85644","state":"PUBLISHED","title":"XS::Parse::Infix versions from 0.40 through 0.49 for Perl treat a number as an array reference","description":"XS::Parse::Infix versions from 0.40 through 0.49 for Perl treat a number as an array reference.\n\nThe wrapper function XS::Parse::Infix generates for a list-associative infix operator checks whether arguments are array references, but it tests using SvRV() rather than SvROK(). SvRV() reads a union slot that only holds a referent once SvROK(sv) is true, so the guard never validates that it is a reference. For an IV or NV that slot holds the number itself, SvRV() returns the caller's value and SvTYPE() dereferences it at offset 12. This will generally result in a segmentation fault.\n\nAn application that hands the wrapper a list built from decoded input (for example, from JSON) lets whoever supplies a number in that list choose the address that the interpreter dereferences.\n\nAn ordinary string's byte 12 is rarely SVt_PVAV so the guard croaks by luck, but an attacker-crafted string carrying 0x0b there passes, and the buffer is then used as an AV head, with AvARRAY taken from bytes 16-23 and its entries pushed onto the Perl stack as live SVs.\n\nA simple proof-of-concept uses the zip operator:\n\n    use Syntax::Operator::Zip 'zip';\n\n    my @args = ([1], 2);\n    zip(@args);","publishedAt":"2026-09-28T16:09:02.613Z","updatedAt":"2026-09-30T19:50:14.371Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"CISA-ADP"},"assigner":"CPANSec","products":["XS-Parse-Keyword"],"affected":[{"packageName":"XS-Parse-Keyword","packageURL":"pkg:cpan/XS-Parse-Keyword","defaultStatus":"unaffected","versions":[{"version":"0.40","status":"affected","lessThanOrEqual":"0.49","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","modules":["XS::Parse::Infix"],"programFiles":["src/infix.c"],"programRoutines":[{"name":"pp_push_defav_with_count"}]}],"references":["https://metacpan.org/release/PEVANS/XS-Parse-Keyword-0.50/changes","https://metacpan.org/release/PEVANS/XS-Parse-Keyword-0.50/diff/PEVANS/XS-Parse-Keyword-0.49#src/infix.c","http://www.openwall.com/lists/oss-security/2026/09/28/14"],"weaknesses":["CWE-843","CWE-125"],"ingestedAt":"2026-10-29T20:13:15.269Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/85xxx/CVE-2026-85644.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-85644","state":"PUBLISHED","datePublished":"2026-09-28T16:09:02.613Z","dateUpdated":"2026-09-30T19:50:14.371Z","assignerShortName":"CPANSec","assignerOrgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateReserved":"2026-09-04T12:35:22.410Z"},"containers":{"cna":{"title":"XS::Parse::Infix versions from 0.40 through 0.49 for Perl treat a number as an array reference","descriptions":[{"lang":"en","value":"XS::Parse::Infix versions from 0.40 through 0.49 for Perl treat a number as an array reference.\n\nThe wrapper function XS::Parse::Infix generates for a list-associative infix operator checks whether arguments are array references, but it tests using SvRV() rather than SvROK(). SvRV() reads a union slot that only holds a referent once SvROK(sv) is true, so the guard never validates that it is a reference. For an IV or NV that slot holds the number itself, SvRV() returns the caller's value and SvTYPE() dereferences it at offset 12. This will generally result in a segmentation fault.\n\nAn application that hands the wrapper a list built from decoded input (for example, from JSON) lets whoever supplies a number in that list choose the address that the interpreter dereferences.\n\nAn ordinary string's byte 12 is rarely SVt_PVAV so the guard croaks by luck, but an attacker-crafted string carrying 0x0b there passes, and the buffer is then used as an AV head, with AvARRAY taken from bytes 16-23 and its entries pushed onto the Perl stack as live SVs.\n\nA simple proof-of-concept uses the zip operator:\n\n    use Syntax::Operator::Zip 'zip';\n\n    my @args = ([1], 2);\n    zip(@args);"}],"affected":[{"packageName":"XS-Parse-Keyword","packageURL":"pkg:cpan/XS-Parse-Keyword","defaultStatus":"unaffected","versions":[{"version":"0.40","status":"affected","lessThanOrEqual":"0.49","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","modules":["XS::Parse::Infix"],"programFiles":["src/infix.c"],"programRoutines":[{"name":"pp_push_defav_with_count"}]}],"references":[{"url":"https://metacpan.org/release/PEVANS/XS-Parse-Keyword-0.50/changes","tags":["release-notes"]},{"url":"https://metacpan.org/release/PEVANS/XS-Parse-Keyword-0.50/diff/PEVANS/XS-Parse-Keyword-0.49#src/infix.c"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-843","description":"CWE-843 Access of Resource Using Incompatible Type ('Type Confusion')","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-125","description":"CWE-125 Out-of-bounds Read","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"CPANSec","orgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateUpdated":"2026-09-28T16:09:02.613Z"},"solutions":[{"lang":"en","value":"Upgrade to XS-Parse-Keyword 0.50 or later."}],"source":{"discovery":"UNKNOWN"},"workarounds":[{"lang":"en","value":"For deployments that cannot upgrade, ensure that correct arguments (only array references where they are expected) are passed to list-associative operators that are defined with XS::Parse::Infix, such as those in Syntax::Operator::Zip."}],"x_generator":{"engine":"cpansec-cna-tool 0.1"}},"adp":[{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2026/09/28/14"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2026-09-28T18:10:33.637Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.5,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2026-09-30T19:50:11.084770Z","id":"CVE-2026-85644","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-09-30T19:50:14.371Z"}}]}}}