Type confusion in CacheStorage (CVE-2026-91741)
CacheStorage preserves cache names as UTF-16, but a delayed code-cache feedback path converts the name to UTF-8 and back, so a cache named with a lone surrogate aliases a different cache named with the replacement character. This allows V8 code cache generated for one script to be attached to another, leading to a type confusion that can crash the renderer and was developed into arbitrary read/write within the V8 heap.
Originally disclosed on Chrome VRP
- Fix shipped in 33 days
TL;DR
CacheStorage preserves cache names as UTF-16, but Chromium's delayed code-cache
feedback path converts that identity to UTF-8 and later back to UTF-16. A cache
named with the lone surrogate U+D800 therefore aliases the distinct cache
named U+FFFD when V8 metadata is written back.
With equal-length, equal-timestamp script responses, code cache generated for A
is attached to B. V8 accepts it and background-merges A's heterogeneous
Script::infos table into B's live Script, confusing a ScopeInfo for a
SharedFunctionInfo. The attached PoC produces a deterministic release-ASAN
renderer crash. The resulting confusion was independently developed into
reusable arbitrary read/write within the V8 heap.
REPRODUCTION CASE
Tested with official Linux x64 release-ASAN Chromium 153.0.8008.0 at branch
position 1679467.
- Run the self-contained server:
python3 poc.py 8000
- Start Chrome with a fresh profile:
ASAN_SYMBOLIZER_PATH="$PWD/llvm-symbolizer" \
ASAN_OPTIONS="detect_leaks=0:symbolize=1:abort_on_error=1:external_symbolizer_path=$PWD/llvm-symbolizer" \
LD_LIBRARY_PATH="$PWD" \
./chrome --headless=new \
--user-data-dir=/path/to/fresh-profile \
--no-first-run --disable-breakpad \
--js-flags="--bytecode-old-time=0 --expose-gc" \
http://127.0.0.1:8000/poc.html
Allow 90 seconds before declaring a miss.
Stock d8 is not a natural reproducer because it does not exercise Blink's
CacheStorage ScriptCacheConsumer path.
VULNERABILITY DETAILS
The broken identity conversion is:
Cache A name: U+D800
-> UTF16ToUTF8: EF BF BD
-> UTF8ToUTF16: U+FFFD
-> open distinct Cache B
Cache names enter the stable API as DOMString, are sent over Mojo as
String16, and are persisted as raw UTF-16. The lossy conversion happens only
after a cached response is served:
// content/browser/cache_storage/cache_storage_cache.cc
base::UTF16ToUTF8(cache_name)
The renderer returns that narrowed string with generated V8 metadata. The browser widens it and reopens the wrong cache:
// content/browser/renderer_host/code_cache_host_impl.cc
raw_remote->Open(base::UTF8ToUTF16(cache_storage_cache_name), ...);
WriteSideData verifies the selected entry's response timestamp, but not a
lossless cache identity, response-generation identifier, or body digest. Two
Workers can construct different responses on the same future wall-clock tick,
making their persisted microsecond timestamps equal.
Affected code path
CacheStorage.open(U+D800)
-> cached response A served through Service Worker
-> CacheStorageCache::CreateResponse
-> UTF16ToUTF8(cache_name) [identity aliases U+FFFD]
-> ServiceWorkerCachedMetadataSender
-> CodeCacheHostImpl::DidGenerateCacheableMetadataInCacheStorage
-> UTF8ToUTF16(cache_storage_cache_name)
-> CacheStorage.open(U+FFFD)
-> WriteSideData attaches A metadata to response B
-> Blink ScriptCacheConsumer
-> V8 BackgroundDeserializeTask::MergeWithExistingScript
-> ScopeInfo treated as SharedFunctionInfo
Verified in the exact tested Chromium source
92b82f6370ea4b223f7bef18ecbb2f370e01dc85:
V8 memory-safety sink
V8's serialized-code source hash contains source length and mode bits.
Equal-length B accepts A's cache. During background
merge, V8 checks that A's new entry is an SFI, but checks only that B's old
entry is weak before casting it to SharedFunctionInfo. Script::infos is
heterogeneous and can contain weak ScopeInfo entries.
Relevant V8 locations at the tested revision:
URL-guard survival
Commit
73dc9f5f4adf98d4c0d72f663859ec7742e12819
rejects cached responses whose final Service Worker URL does not match the
request. It does not repair the cache-name alias.
VERSION
- Chrome ASAN: Chromium
153.0.8008.0, official Linux x64 release-ASAN archive at branch position1679467 - Chromium commit:
92b82f6370ea4b223f7bef18ecbb2f370e01dc85 - V8:
15.3.66, commit4cc419d166f3c05856baaa87855f414b89aedc98
BISECTION
The cache-name alias was introduced by:
309dc309578fc770656718e0e733c8a92f229688
Cache Storage WPT: Update backend cache name type to std::u16string
Cr-Commit-Position: refs/heads/main@{#1429711}
309dc309578fc770656718e0e733c8a92f229688
made CacheStorage names lossless UTF-16 while leaving the delayed code-cache
feedback identity as UTF-8. Its parent normalized both names through UTF-8, so
U+D800 and U+FFFD could not coexist as distinct caches in this form.
The V8 sink became reachable with heterogeneous Script::infos in:
cc09cc9195b326dee8a24881eed9f670b4916969
[parsing] Reuse scope infos held alive through eval
Cr-Commit-Position: refs/heads/main@{#95043}
ATTACHMENTS
poc.py: self-contained browser crash reproducer and HTTP server.asan.txt: complete crash evidence, symbolization, command, and reliability result.
CREDIT INFORMATION
Reporter credit:
Salvatore Gulizia (nickname: Serotav)
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the cache name is converted lossily from UTF-16 to UTF-8 and back in the code-cache feedback path, so distinct cache names become identical, and the subsequent V8 merge trusts the wrong cache identity.
Impact
The attached PoC produces a deterministic release-ASAN renderer crash, and the resulting confusion was independently developed into reusable arbitrary read/write within the V8 heap.
What the attacker needed
Victim visits a malicious page; browser supports CacheStorage and Service Workers; specific Chromium version
How it was found
- Run the self-contained server.
- Start Chrome with a fresh profile and specific flags.
- Allow 90 seconds before declaring a miss.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
CacheStorage lets websites store responses under names. The browser sometimes converts those names between two text formats, and that conversion can turn two different names into the same one. As a result, the browser can mix up stored code for two different scripts, which can crash the browser and potentially let an attacker run harmful code.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.