Vulnerability DatabaseCVE-2026-103111

CVE-2026-103111: 
MariaDB Server vulnerability analysis and mitigation

Overview

CVE-2026-103111 is an out-of-bounds write vulnerability in PCRE2's JIT matching engine that allows an attacker-controlled regular expression to write arbitrary data outside the bounds of a growable JIT stack. It affects all PCRE2 versions up to and including 10.48, and is fixed in version 10.49. The vulnerability was reported by Michael Allen, with the fix developed by Zoltan Herczeg; it was publicly disclosed on September 28–30, 2026. It carries a CVSS v3.1 base score of 7.6 (High) (PCRE2 Advisory, GitHub Advisory).

Technical details

The root cause is an out-of-bounds write (CWE-787) in PCRE2's JIT stack-resize stub (sljit_stack_resize()). When JIT-compiled matching code reserves a stack frame, it subtracts the required frame size from the current stack top and compares the result with the stack limit; if the new top is below the limit, a shared resize stub is invoked. Before the fix, this stub always lowered the limit by a fixed 8,192 bytes — insufficient when a single frame allocation (e.g., 33,640 bytes for a pattern with 1,400 capturing groups) exceeds that increment. The resize could succeed and return even though the adjusted stack top remained below the new limit by ~25,448 bytes, causing subsequent frame-initialization writes to occur outside the permitted JIT stack mapping. Exploitation requires the target application to use JIT matching with a growable stack created via pcre2_jit_stack_create() and assigned via pcre2_jit_stack_assign(), and the attacker must be able to supply or cause the compilation of a pattern with an unusually large single stack allocation (PCRE2 Advisory).

Impact

Successful exploitation results in an out-of-bounds write of over 139,000 bytes into memory adjacent to the JIT stack mapping, potentially corrupting heap allocations, function pointers, or return addresses. Demonstrated consequences include process crashes and silent memory corruption that may go undetected until corrupted data is later used; the advisory notes that arbitrary code execution should be assumed possible depending on memory layout. Confidentiality impact is low (subject buffer pointers may be written into adjacent allocations), integrity impact is high (arbitrary memory corruption), and availability impact is low to moderate (process instability or crash) (PCRE2 Advisory, Feedly).

Exploitability

A complete standalone C proof-of-concept (pcre2_10_48_jit_stack_underwrite_poc.c) is publicly available in the PCRE2 security advisory, with compilation instructions and two demonstration modes (physical and logical) that confirm out-of-bounds writes (PCRE2 Advisory). The EPSS score is approximately 0.21%, indicating a relatively low near-term exploitation probability (GitHub Advisory). The NVD SSVC assessment classifies exploitation status as "poc" with technical impact "partial" and automatable as "no". There is no evidence of in-the-wild exploitation or threat actor attribution at this time, and the vulnerability is not currently listed in the CISA KEV catalog (Feedly).

Exploitation steps

  1. Reconnaissance: Identify target applications that use PCRE2 versions ≤10.48 with JIT support enabled and accept attacker-controlled regular expressions (e.g., web applications using PHP with phpMyAdmin, or other software exposing regex input to users).
  2. Craft malicious pattern: Construct a regular expression with 1,400 distinct referenced capturing groups and recursive matching. This forces the JIT compiler to generate a stack frame of approximately 33,640 bytes (4,205 words on 64-bit systems), exceeding the 8,192-byte fixed growth increment.
  3. Trigger JIT compilation: Submit the crafted pattern to the target application, causing it to call pcre2_compile() with JIT enabled, which compiles the pattern and generates code requiring the oversized frame.
  4. Initiate JIT matching: Cause the application to call pcre2_jit_match() or pcre2_match() (with JIT) against any subject string using the growable JIT stack. The PoC uses a 10-byte subject string.
  5. Trigger stack boundary failure: The JIT-generated code subtracts the 33,640-byte frame from STACK_TOP, finds it below STACK_LIMIT, and enters the resize stub. The stub lowers the limit by only 8,192 bytes, succeeds, and returns — leaving STACK_TOP ~25,448 bytes below the new limit.
  6. Out-of-bounds write occurs: Frame-initialization stores write through the invalid stack top into memory below the JIT stack mapping (observed at up to 139,976 bytes below the mapping boundary on macOS/ARM64), potentially corrupting adjacent allocations including heap metadata or pointers.
  7. Observe result and leverage corruption: The match returns PCRE2_ERROR_JIT_STACKLIMIT (-46) after the writes have occurred. Depending on memory layout, the corrupted data (which may include subject buffer pointers) can be leveraged for further exploitation such as arbitrary code execution (PCRE2 Advisory).

Indicators of compromise

  • Logs: Application logs showing pcre2_match returning error code -46 (PCRE2_ERROR_JIT_STACKLIMIT) unexpectedly, especially when processing user-supplied regular expressions; crash reports or core dumps from processes using PCRE2 JIT matching.
  • Process Behavior: Unexpected process crashes or memory corruption errors (e.g., heap corruption detected by allocator) in applications that accept user-supplied regex patterns; abnormal termination signals (SIGSEGV, SIGABRT) from PCRE2-linked processes.
  • File System: Presence of the PoC file pcre2_10_48_jit_stack_underwrite_poc.c or its compiled binary on the system (SHA-256: 2bda01bc0d70ac7888a8205aa9141e4bf8efcc0e7b48cc50eb23adca56756cd4).
  • Network: Unusual or malformed regex patterns submitted via HTTP requests to applications that expose regex functionality (e.g., search fields, validation endpoints), particularly patterns containing large numbers of capturing groups (e.g., 1,000+ groups) (PCRE2 Advisory).

Mitigation and workarounds

Upgrade PCRE2 to version 10.49 or later, which contains the fix (commit 2b4038298072684b0fae29b15bedfb1a75bda46d); backport patches for supported earlier releases are documented in PCRE2's SUPPORT-LIFECYCLE.md. Red Hat has issued security errata for RHEL 8 (RHSA-2026:81613), RHEL 9 (RHSA-2026:81532), RHEL 10 (RHSA-2026:81522), and RHEL 9.6 EUS (RHSA-2026:82845) (Red Hat Bugzilla). If immediate patching is not possible, the following workarounds apply: (1) do not JIT-compile attacker-controlled regular expressions; (2) do not assign a growable JIT stack — allow JIT matching to use the default machine stack instead; or (3) disable JIT matching entirely by passing PCRE2_NO_JIT to pcre2_match(). Increasing the maximum JIT stack size is explicitly noted as not a reliable workaround (PCRE2 Advisory).

Community reactions

The PCRE2 maintainers published a detailed security advisory noting that the vulnerability is not a regression and affects all earlier PCRE2 releases containing the JIT stack implementation, and that further exploitation including arbitrary code execution should be assumed possible (PCRE2 Advisory). Red Hat rated the issue as High severity and issued multiple errata across RHEL 8, 9, and 10 within approximately two weeks of disclosure (Red Hat Bugzilla). The original reporter noted that the vulnerability was discovered while testing phpMyAdmin and that a lab proof-of-concept achieved command execution through phpMyAdmin's use of attacker-controlled regular expressions, highlighting the real-world risk to PHP applications (PCRE2 Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

pcre2: 10.42-1+deb12u2

Fixed

sid

pcre2: 10.48-3.1

Fixed

trixie

pcre2: 10.46-1~deb13u3

Fixed

Ubuntu

Fixed

bionic (esm-apps)

pcre2: 10.31-2ubuntu0.1~esm2

Fixed

devel

pcre2

Affected

focal (esm-infra)

pcre2: 10.34-7ubuntu0.1+esm1

Fixed

jammy

pcre2: 10.39-3ubuntu0.2

Fixed

noble

pcre2: 10.42-4ubuntu2.2

Fixed

resolute

pcre2: 10.46-1ubuntu0.1

Fixed

xenial (esm-apps-legacy)

pcre2

Not Affected

RHEL / CentOS

Fixed

OpenShift

el9:openshift/ose-rhel-coreos-9-0:413.92.202611041925-0

Fixed

RHEL 8

:baseos:pcre2-0:10.32-4.el8_10.src

Fixed

RHEL 9

:appstream:pcre2-0:10.40-2.el9_2.1.src

Fixed

RHEL 10

pcre2-0:10.44-1.4.el10_0.src

Fixed

Alpine

Fixed

edge

pcre2: 10.49-r0

Fixed

v3.21

pcre2: 10.43-r1

Fixed

v3.22

pcre2: 10.46-r1

Fixed

v3.23

pcre2: 10.49-r0

Fixed

Source: This report was generated using AI

Related MariaDB Server vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-92262CRITICAL9.9
  • MariaDB Server logoMariaDB Server
  • mariadb1011-sphinx-engine-debuginfo
NoYesOct 16, 2026
CVE-2026-97380HIGH8.8
  • MariaDB Server logoMariaDB Server
  • mariadb:10.11::mariadb-oqgraph-engine
NoYesOct 16, 2026
CVE-2026-102523HIGH8
  • MariaDB Server logoMariaDB Server
  • mariadb123-rocksdb-engine
NoYesNov 05, 2026
CVE-2026-86047HIGH7.7
  • MariaDB Server logoMariaDB Server
  • mariadb-test
NoYesOct 16, 2026
CVE-2026-85985MEDIUM5.4
  • MariaDB Server logoMariaDB Server
  • mariadb:10.3::Judy
NoYesOct 16, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management