# CVE-2026-89162: PCRE2 uninitialized memory disclosure in pcre2_serialize_encode

Source: https://junglewise.ai/threats/cve-2026-89162-pcre2-uninitialized-memory-disclosure-in-pcre2-serialize-encode  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-11. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-89162 · Severity: low · CVSS 2.9 · Published 2026-09-11

PCRE2 is a widely-used regular expression library embedded in many applications and languages. A flaw in its serialization function can inadvertently expose two bytes of uninitialized memory from previous allocations when converting compiled patterns to a portable format. While the impact is limited to two bytes and requires the attacker to already have access to serialized data, this could leak sensitive information in edge cases.

## Quick answers

**Is CVE-2026-89162 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-89162 being exploited in the wild.

**How severe is CVE-2026-89162?** Low severity, with a CVSS score of 2.9, published 11 September 2026.

**Which products and versions are affected?** PCRE2Project PCRE2 10.45 to before 10.48.

**Is there a fix for CVE-2026-89162?** A patch was published on 2026-08-31: Fixed in version 10.48 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-89162 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-89162?** Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a use-of-uninitialized-memory (CWE-908) flaw in pcre2_serialize_encode(). When certain regular expressions with Unicode character classes are compiled with specific options (e.g., [\H] with PCRE2_UTF), the compiled structure contains two uninitialized bytes that are not sanitized before serialization. In debug builds, these bytes are deliberately initialized to 0x5555, but in production builds they retain whatever data was previously in that memory location. An attacker who can read the serialized output may recover those two bytes. The attack requires local access, high complexity to control what bytes are exposed, and the serialized data must be exposed to an untrusted actor—a scenario the PCRE2 developers consider unsafe. Fixed in version 10.48.

## Affected products

- PCRE2Project PCRE2 10.45 to before 10.48

## Timeline

- 2025-10-25: disclosed
- 2026-08-31: patched: Fixed in version 10.48

## References

- [https://github.com/PCRE2Project/pcre2/releases/tag/pcre2-10.48](https://github.com/PCRE2Project/pcre2/releases/tag/pcre2-10.48)
- [https://github.com/PCRE2Project/pcre2/security/advisories/GHSA-q7rw-r7qq-2hx6](https://github.com/PCRE2Project/pcre2/security/advisories/GHSA-q7rw-r7qq-2hx6)
