ZeroHour

CVE-2026-86145

mass

Out-of-Bounds Write in PCRE2 Regular Expression Library (pcre2_dfa_match)

CVSS 3.1
8.2 high
EPSS
<1%p31
Published
()
Modified
AI analysis

PCRE2, the widely embedded Perl-compatible regular expression library, contains an out-of-bounds write in its pcre2_dfa_match function because the code path that reuses a cached workspace block skips the size check that a newly allocated block performs. Triggering the flaw requires either an attacker-controlled regular expression or a recursive pattern combined with a small heap limit set through the API, conditions that arise in applications that let users supply regex patterns or tune PCRE2's heap limit. A successful attacker can write beyond the workspace buffer, corrupting data (high integrity impact per CVSS 3.1) with only low availability impact; code execution is not documented. Any application, service, or language runtime bundling PCRE2 before 10.48 is affected, with real-world exposure concentrated in software that passes user-controlled regexes to the library. No public proof-of-concept or in-the-wild exploitation is known, EPSS puts the 30-day exploitation probability at 0.4%, and the flaw is fixed in PCRE2 10.48.

What to do: Upgrade PCRE2 to 10.48 or later, and install vendor updates (new PHP packages, distribution packages, or application releases) that bundle the fixed library. Audit whether your applications expose user-supplied regular expressions or call pcre2 APIs with recursive patterns and a reduced heap limit, and restrict or validate such inputs until patched. No public PoC or in-the-wild exploitation is known, so no emergency action is required beyond normal patching.

Affected
PCRE2 project PCRE2All versions before 10.48 (fixed in 10.48)
Estimated exposure
mass≈millions of installations of software bundling PCRE2 (e.g., PHP, Apache HTTP Server); the directly exploitable subset is unknown — PCRE2 is one of the most widely deployed regex engines, bundled by PHP, the Apache HTTP Server, and many other open-source projects, implying millions of vulnerable copies in the wild, though only applications that accept…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

PCRE2 before 10.48 allows a pcre2_dfa_match out-of-bounds write because reuse of a cached workspace block, in a recursive DFA matching workspace, lacks a size check (even though a newly allocated block, for the same purpose, does have a size check). This outcome requires an attacker-controlled regular expression, or a recursive pattern in conjunction with a small heap limit (this can be set through the API).

Weakness
CWE-424
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

In the news

Re: pcre2 version 10.48 released with security fixes

PCRE2 10.48 released with security fixes; seven vulnerabilities assigned CVEs including CVE-2026-86145 and CVE-2026-89156 through CVE-2026-89162.

The PCRE2 regular expression library released version 10.48 with multiple security fixes, disclosed on the oss-security mailing list. Seven issues received CVE assignments: CVE-2026-86145, CVE-2026-89156, CVE-2026-89157, CVE-2026-89158, CVE-2026-89160, CVE-2026-89161, and CVE-2026-89162. PCRE2 is a widely used regex engine embedded in many open-source projects and applications. No exploitation is reported in the disclosure.

Re: pcre2 version 10.48 released with security fixes

PCRE2 10.48 ships security fixes; one issue received CVE-2026-86145 while others await identifiers amid CNA backlogs.

Salvatore Bonaccorso noted on oss-security that PCRE2 version 10.48 includes security fixes, with one issue assigned CVE-2026-86145 and remaining fixes not yet assigned identifiers. The post criticizes large CNA backlogs delaying CVE assignment, which complicates downstream fix tracking. No exploitation is reported.

oss-security · 10d agoVulnerabilityCVE-2026-86145