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).
Published: 2026-09-05
Score: 8.2 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

PCRE2 versions prior to 10.48 permit an out‑of‑bounds write during a pcre2_dfa_match operation. The bug arises when a cached workspace block used in recursive DFA matching is reused without a size check, even though a freshly allocated block for the same purpose includes such a check. The effect is memory corruption, which can be leveraged by an attacker to execute arbitrary code. The description indicates that this requires either an attacker‑controlled regular expression or the use of a recursive pattern together with a small heap limit that can be set through the API. The vulnerability is therefore an exploitable memory corruption that can lead to remote code execution if a malicious input is processed by a vulnerable library.

Affected Systems

The affected product is PCRE2, a commonly used regular expression engine used in many programming languages and applications. Versions of PCRE2 prior to 10.48 are vulnerable; any installation of older PCRE2 that performs DFA matching with recursive patterns is at risk. No specific vendor release notes are included, but the fix is available in release 10.48 as referenced on the project’s repository.

Risk and Exploitability

The CVSS score of 8.2 classifies this as high severity. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. The nature of the out‑of‑bounds write suggests that an attacker would need to supply a crafted regular expression that triggers the recursive DFA path and potentially set a small heap limit via the API. Because the vulnerability is tied to specific regex constructs and configuration knobs, exploitation is non‑trivial but attainable by an attacker who can influence the input to a vulnerable library.

Generated by OpenCVE AI on September 5, 2026 at 06:24 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PCRE2 to version 10.48 or later to eliminate the out‑of‑bounds write
  • If an upgrade is not immediately possible, restrict the use of recursive patterns in regular expressions or increase the heap limit to avoid triggering the vulnerable code path
  • Apply input validation or sandboxing to reject or isolate suspicious regex patterns that could exploit the library

Generated by OpenCVE AI on September 5, 2026 at 06:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 05 Sep 2026 06:45:00 +0000

Type Values Removed Values Added
Title Out-of-Bounds Write in PCRE2 DFA Matching Due to Cached Workspace Size Check Missing

Sat, 05 Sep 2026 05:30:00 +0000

Type Values Removed Values Added
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).
First Time appeared Pcre
Pcre pcre2
Weaknesses CWE-424
CPEs cpe:2.3:a:pcre:pcre2:*:*:*:*:*:*:*:*
Vendors & Products Pcre
Pcre pcre2
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L'}


cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-09-05T05:09:25.571Z

Reserved: 2026-09-05T05:09:25.213Z

Link: CVE-2026-86145

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-05T06:17:10.370

Modified: 2026-09-05T06:17:10.370

Link: CVE-2026-86145

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-05T06:30:04Z

Weaknesses
  • CWE-424

    Improper Protection of Alternate Path