CSIRTS // UNIFIED SECURITY ADVISORY FEEDSYS ● ONLINE · POWERED BY INTELFUSIONS.COM

CVE-2026-71498

mediumCVSS 5.1covered by 2 sourcesfirst seen 2026-08-06
Summary re2 infers a character's byte length from its UTF-8 lead byte alone, with no bound on the bytes actually remaining in the input. Buffer arguments reach the native layer verbatim — only strings are re-encoded into well-formed UTF-8 — so a Buffer whose last byte is a multi-byte lead promises continuation bytes that are not there, and the result builders read up to 3 bytes past the end of the buffer. In replace() and split() those bytes are copied into the returned Buffer, disclosing adjacent heap memory to JavaScript. The trigger is deterministic and requires no special heap grooming. Only Buffer input is affected. String input was never at risk: re-encoding guarantees every multi-byte sequence is complete. Root cause getUtf8CharSize maps a lead byte to a length of 1–4 and never sees the input size: // lib/wrapped_re2.h inline size_t getUtf8CharSize(char ch) { return ((0xE5000000 >> ((ch >> 3) & 0x1E)) & 3) + 1; } Callers then read that many bytes. In the zero-width branch of replace(), the guard proves only that at least *one* byte remains: // lib/replace.cc else if ((size_t)offset < size) { auto sym_size = getUtf8CharSize(data[offset]); // may claim up to 4 bytes result.append(data + offset, sym_size); // reads data[offset .. offset + 3] byteIndex = offset + sym_size; } offset < size permits offset == size - 1, so a lead byte of 0xF0 makes append read data[size], data[size + 1] and data[size + 2]. Seven read sites shared the defect: | Site | Argument | Disclosed to JS | |---|---|---| | lib/replace.cc (zero-width branch) | subject | yes | | lib/replace.cc (callback replacer) | subject | yes | | lib/replace.cc (replacement scan) | replacement | yes | | lib/split.cc | subject | yes | | lib/pattern.cc translateRegExp (x2) | pattern | no | | lib/pattern.cc escapeRegExp | pattern | no | Three further callers were not vulnerable, because they use the result only to advance an index and never dereference past the end: getUtf16PositionByCounter in lib/wrap

⚡ Watch CVE-2026-71498

Get an email if CVE-2026-71498 is added to CISA KEV, gains public exploit code, or a new advisory cites it — max one per day, one-click unsubscribe.

Advisory coverage (2)

External references

NVD record for CVE-2026-71498

CVE.org record

Embed the live status

CVE-2026-71498 live status badge — this badge updates automatically when the KEV or exploit status changes. How to embed it →

[![CVE-2026-71498 status](https://www.csirts.com/badge/CVE-2026-71498)](https://www.csirts.com/cve/CVE-2026-71498)