{"id":"CVE-2026-8376","state":"PUBLISHED","title":"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 a heap buffer overflow when compiling regular expressions with a repeated fixed string on 32-bit builds","description":"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 a heap buffer overflow when compiling regular expressions with a repeated fixed string on 32-bit builds.\n\nPerl_study_chunk in regcomp_study.c checked the size of the joined substring buffer in characters rather than bytes. For a quantified fixed substring with a large minimum count, the byte length mincount * l could overflow SSize_t, producing an undersized SvGROW allocation; the subsequent copy writes past the end of the buffer.\n\nA caller that compiles an attacker-controlled regular expression on a 32-bit perl build triggers a heap buffer overflow at compile time.","publishedAt":"2026-05-25T23:53:27.812Z","updatedAt":"2026-09-08T21:33:36.127Z","severity":{"score":7.3,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","source":"CISA-ADP"},"assigner":"CPANSec","products":["perl"],"affected":[{"packageName":"perl","packageURL":"pkg:cpan/perl","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"5.40.5-RC1","versionType":"custom"},{"version":"5.41.0","status":"affected","lessThan":"5.42.3-RC1","versionType":"custom"},{"version":"5.43.0","status":"affected","lessThan":"5.43.11","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","modules":["perl"],"programFiles":["regcomp_study.c"],"programRoutines":[{"name":"Perl_study_chunk"}],"repo":"https://github.com/Perl/perl5"}],"references":["https://github.com/Perl/perl5/commit/5e7f119eb2bb1181be908701f22bf7068e722f1c.patch","http://www.openwall.com/lists/oss-security/2026/05/26/1"],"weaknesses":["CWE-680"],"ingestedAt":"2026-10-29T20:13:26.108Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/8xxx/CVE-2026-8376.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-8376","state":"PUBLISHED","datePublished":"2026-05-25T23:53:27.812Z","dateUpdated":"2026-09-08T21:33:36.127Z","assignerShortName":"CPANSec","assignerOrgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateReserved":"2026-05-12T08:15:41.456Z"},"containers":{"cna":{"title":"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 a heap buffer overflow when compiling regular expressions with a repeated fixed string on 32-bit builds","descriptions":[{"lang":"en","value":"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 a heap buffer overflow when compiling regular expressions with a repeated fixed string on 32-bit builds.\n\nPerl_study_chunk in regcomp_study.c checked the size of the joined substring buffer in characters rather than bytes. For a quantified fixed substring with a large minimum count, the byte length mincount * l could overflow SSize_t, producing an undersized SvGROW allocation; the subsequent copy writes past the end of the buffer.\n\nA caller that compiles an attacker-controlled regular expression on a 32-bit perl build triggers a heap buffer overflow at compile time."}],"affected":[{"packageName":"perl","packageURL":"pkg:cpan/perl","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"5.40.5-RC1","versionType":"custom"},{"version":"5.41.0","status":"affected","lessThan":"5.42.3-RC1","versionType":"custom"},{"version":"5.43.0","status":"affected","lessThan":"5.43.11","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","modules":["perl"],"programFiles":["regcomp_study.c"],"programRoutines":[{"name":"Perl_study_chunk"}],"repo":"https://github.com/Perl/perl5"}],"references":[{"url":"https://github.com/Perl/perl5/commit/5e7f119eb2bb1181be908701f22bf7068e722f1c.patch","tags":["patch"]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-680","description":"CWE-680 Integer Overflow to Buffer Overflow","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"CPANSec","orgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateUpdated":"2026-09-08T21:33:36.127Z"},"solutions":[{"lang":"en","value":"Upgrade to Perl 5.40.5, 5.42.3 or 5.44.0 or later, or apply the upstream patch."}],"source":{"discovery":"UNKNOWN"},"timeline":[{"lang":"en","time":"2026-04-24T00:00:00.000Z","value":"Issue reported."},{"lang":"en","time":"2026-05-20T00:00:00.000Z","value":"Fix merged to blead."}],"workarounds":[{"lang":"en","value":"On 32-bit perl builds, avoid compiling regular expressions from untrusted input until a fixed release is installed."}],"x_generator":{"engine":"cpansec-cna-tool 0.1"}},"adp":[{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2026/05/26/1"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2026-05-26T03:06:00.816Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.3,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","integrityImpact":"LOW","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"LOW","privilegesRequired":"NONE","confidentialityImpact":"LOW"}},{"other":{"type":"ssvc","content":{"timestamp":"2026-05-27T18:03:45.554441Z","id":"CVE-2026-8376","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-05-27T18:04:00.329Z"}}]}}}