CVE Database›Document archive›CVE-2026-86145

CVE-2026-86145

pcre2: PCRE2: Out-of-bounds write allows arbitrary code execution via crafted regular expressions

Loading…

Severity

Important

Red Hat Product Security

8.2

CVSS 3.1

Review impact separately from score.

Published · September 5, 2026

Updated · November 4, 2026

Description

A flaw was found in PCRE2. An out-of-bounds write vulnerability exists in the pcre2_dfa_match function due to improper size checking when reusing cached workspace blocks. A remote attacker could exploit this by providing a specially crafted regular expression or a recursive pattern in conjunction with a small heap limit. This could lead to data corruption or potentially arbitrary code execution, compromising the integrity and availability of the system.

Statement

Important: An out-of-bounds write vulnerability in the PCRE2 library, specifically within the pcre2_dfa_match function, could allow arbitrary code execution. This flaw is exploitable in Red Hat products when processing attacker-controlled regular expressions or when a recursive pattern is used in conjunction with a small, API-set heap limit, making it dependent on specific application usage patterns.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

To mitigate this Improper Protection of Alternate Path vulnerability, ensure that secondary execution branches—such as the reuse of cached memory workspaces—enforce the exact same size and boundary checks as the primary memory allocation paths. Limit exposure by preventing untrusted user input from directly controlling PCRE2 regular expressions, and strictly avoid utilizing recursive matching patterns when operating under a low heap limit. Apply a defense-in-depth strategy by validating all inputs comprehensively.

CVSS / CWE

CVSS 3.1 · 8.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

CWE-787 · Out-of-bounds Write