ZeroHour

CVE-2026-89161

mass

Incorrect free (double free) in PCRE2 JIT matching before 10.48

CVSS 3.1
7.4 high
EPSS
Published
()
Modified
AI analysis

PCRE2, the widely embedded Perl-compatible regular-expression library, contains a memory-management flaw (CWE-590, multiple/incorrect frees of an allocation) in its JIT matching entry point pcre2_jit_match: when a match context carries a previously copied subject, the routine can perform an incorrect free operation on that memory. The bug is only reachable when an application calls pcre2_jit_match with such a copied-subject context, and the CVSS vector (AV:L/AC:H) indicates exploitation requires local or in-process access under specific conditions, making a straightforward remote exploit unlikely. An attacker who can steer a vulnerable application into this call path could corrupt the heap, potentially causing a crash (denial of service) and, per the high confidentiality/integrity/availability ratings, possibly memory disclosure or code execution. Any system running software built with PCRE2 versions before 10.48 that uses the affected JIT call pattern is potentially affected; the flaw is fixed in PCRE2 10.48. There is currently no public proof-of-concept, the issue is not listed in CISA's Known Exploited Vulnerabilities catalog, and no exploitation has been reported in the wild.

What to do: Upgrade PCRE2 to 10.48 or later, or install your operating system or vendor's patched PCRE2 package, and ensure applications that bundle their own copy of the library are rebuilt or updated. Until patched, audit whether your code paths invoke pcre2_jit_match with a match context containing a previously copied subject, since that call pattern is required to reach the bug. With no known proof-of-concept or in-the-wild exploitation, routine patch timelines are reasonable, but monitor the PCRE2 project and downstream packagers for follow-up advisories.

Affected
PCRE2 project PCRE2all versions before 10.48 (fixed in 10.48)
Estimated exposure
masstens of millions of installations (PCRE2 ships with virtually every Linux distribution and is bundled in many applications; the subset actually reachable via… — PCRE2 is a ubiquitous open-source regex library bundled with nearly every Linux distribution and embedded in many mainstream products, so the count of systems carrying the vulnerable library is orders of magnitude above the mass threshold,…

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

Description

In PCRE2 before 10.48, pcre2_jit_match mishandles a previously copied subject being passed in as a context. An incorrect free operation can occur.

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

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.