CVE-2026-89162 in PCRE2info

Summary

by MITRE • 09/11/2026

In PCRE2 before 10.48, pcre2_serialize_encode might disclose two bytes to an adversary, typically in a situation where the access available to the adversary is already unsafe.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 09/11/2026

The vulnerability identified in versions of the Perl Compatible Regular Expressions library prior to version 10.48 involves an improper handling of memory during the serialization process for compiled regular expression patterns. Specifically, within the pcre2_serialize_encode function, there exists a flaw that results in the disclosure of two bytes from adjacent memory locations into the serialized output stream. This issue arises because the encoding routine does not strictly bound its read operations to only the intended data structures associated with the regex pattern being encoded. Instead, under certain conditions related to how internal tables and offsets are calculated or accessed, the function may inadvertently include uninitialized or residual data that resides immediately following the allocated buffer in memory.

From a technical perspective, this behavior constitutes an out-of-bounds read vulnerability. The root cause lies in the algorithmic logic used to determine the size of the serialized block. If the calculation fails to account for padding requirements or if internal pointers are misaligned during the copy operation, the function will write two extra bytes into the output buffer. These bytes do not belong to the regular expression data itself but rather represent whatever information was previously stored in that specific region of memory by other processes or previous allocations within the same application context. This is a classic example of an Information Exposure vulnerability where sensitive internal state can leak through side channels, although in this specific case, the leakage is limited to just two bytes and typically occurs during the serialization phase rather than during pattern matching execution.

The operational impact of this flaw depends heavily on the surrounding security context and how the serialized data is utilized by the hosting application. Since the vulnerability involves reading memory that should not be accessible via the regex engine itself, it falls under the category of CWE-200: Exposure of Sensitive Information to an Unauthorized Actor. The severity is generally considered low to medium because the amount of leaked data is minimal and often consists of non-critical metadata or null bytes unless the application places highly sensitive information in adjacent memory slots immediately after regex compilation buffers. However, if an attacker can control the input that triggers this serialization path repeatedly, they might be able to perform a differential analysis on the two-byte leaks across multiple requests. This could potentially aid in heap layout fingerprinting or bypassing certain security mitigations like Address Space Layout Randomization by revealing pointers or object types stored nearby.

In terms of threat modeling and attack vectors, this vulnerability aligns with ATT&CK technique T1074: Data Staged, specifically the Local data staging sub-technique if an attacker uses the serialized output as a carrier for exfiltrated information, although more accurately it maps to initial access or discovery phases where memory content is probed. It also relates to CWE-284: Improper Access Control since the function fails to enforce strict boundaries on its read operations relative to allocated memory regions. The risk is exacerbated if the application serializes regex patterns derived from untrusted user input and then transmits these serialized blobs over a network or stores them in an accessible location, thereby providing an external adversary with potential insights into the internal memory layout of the process.

Mitigation strategies for this vulnerability are straightforward given that it has been addressed in subsequent releases. The primary defense is to upgrade the PCRE2 library to version 10.48 or later, where the serialization logic has been corrected to ensure that only valid pattern data is written to the output buffer without exceeding allocated boundaries. For applications unable to immediately update their dependencies, developers should implement strict input validation and avoid serializing regex patterns derived from untrusted sources unless absolutely necessary. Additionally, employing memory protection mechanisms such as Address Sanitizers during development and testing can help detect similar out-of-bounds read issues early in the software lifecycle. Regular security audits focusing on C library usage, particularly around buffer management and serialization functions, are recommended to prevent analogous flaws in other components of the system.

Responsible

MITRE

Reservation

09/11/2026

Disclosure

09/11/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!