Use after free in FileSystem (CVE-2026-10886)
A use-after-free occurs in the browser process when an incognito window is closed while file-system observer callbacks from in-flight OPFS writes are still queued. An attacker could trigger a browser-process crash from web content, though a dangling-pointer check turns the corruption into an abort in stable builds.
Originally disclosed on Chrome VRP
- Fix shipped in 43 days
Report description
Browser-process UAF in FileSystemAccessBucketPathWatcher
Bug location
Where do you want to report your vulnerability?
Chrome VRP – Report security issues affecting the Chrome browser. See program rules
The problem
Please describe the technical details of the vulnerability
Hi team, there's a web reachable browser process UAF on FileSystemAccessBucketPathWatcher. this one is triggered by closing an incognito window while FileSystemObserver + OPFS writes are in flight. ASan trace attached
summary
heap-UAF in storage::TaskRunnerBoundObserverList<FileChangeObserver>::Notify at task_runner_bound_observer_list.h:64-77. when the incognito profile tears down while an OPFS write is in flight on file_task_runner, ~FileSystemAccessBucketPathWatcher runs synchronously on UI while the Unretained-bound PostTask from the in-flight write is still queued. the next UI drain dispatches through the freed 888-byte watcher slot. READ of size 8 at offset +864. MiraclePtr also fires a dangling-pointer-instantiation report at base/memory/raw_ptr_asan_service.cc:853 just before the UAF, from the same dispatch. chromium 149.0.7806.0 (dev/trunk HEAD 02fe3add0ed5), Ubuntu 24.04, ASan is_asan=true dcheck_always_on=false
repro steps
- build ASan Chrome with
gn gen out/asan --args='is_asan=true is_debug=false dcheck_always_on=false' && autoninja -C out/asan chrome - put the attached
poc.htmlandserver.pyin the same directory, then serve onhttp://127.0.0.1:8765by running the server (python3 server dot py, Python only per VRP rules) - launch Chrome:
xvfb-run -a env ASAN_OPTIONS='halt_on_error=1:abort_on_error=0:detect_leaks=0:symbolize=1' \
./out/asan/chrome \
--no-sandbox \
--headless=new \
--disable-gpu \
--disable-crashpad-for-testing \
--disable-breakpad \
--disable-crash-reporter \
--disable-in-process-stack-traces \
--disable-dev-shm-usage \
--user-data-dir=/tmp/chrome-poc \
--incognito \
--enable-blink-features=FileSystemObserver \
--enable-features=NetworkServiceInProcess \
--disable-features=HttpsUpgrades,HttpsFirstModeIncognito \
--no-first-run \
--no-default-browser-check \
"http://127.0.0.1:8765/poc.html"
PoC:
navigator.storage.getDirectory()opens OPFSnew FileSystemObserver(cb).observe(root)registers the watcher inchange_observers_throughFileSystemAccessObserverHost::Observe→SandboxFileSystemBackendDelegate::AddFileChangeObserver- 40 infinite-loop chains of 4 MiB
createWritable().write().close()ops fire, saturating file_task_runner with DidWrite callbacks that each callNotify()and queuebase::Unretained(watcher)PostTasks on UI - at 6 seconds the page calls
window.close()on itself, which is the last incognito window.BrowserManagerService::DeleteBrowserat browser_manager_service.cc:129 runsProfileDestroyer::DestroyOTRProfileWhenAppropriateWithTimeout→OffTheRecordProfileImpl::~OffTheRecordProfileImpl→BrowserContextImpl::ShutdownStoragePartitions→~FileSystemAccessManagerImpl→~FileSystemAccessWatcherManager→~FileSystemAccessBucketPathWatcher - the UI message pump continues draining queued work after the destructors return, and the first such task is the in-flight
Unretained(watcher)callback. ASan fires at the vtable load
one local-infra note. on my Xvfb + --no-sandbox + ASan setup, Chromium's non-component FD-ownership tracker (content/app/content_main.cc:326, base::subtle::EnableFDOwnershipEnforcement(true)) crashes child processes before they load any pages. I had to patch that single line to EnableFDOwnershipEnforcement(false) to get poc.html to load. if your infra doesn't trip the tracker you can skip the patch. trying the unmodified chrome first is the right move, and only applying the patch if you see Crashing due to FD ownership violation: spam in stderr. the FD-tracker code is absent from every frame of the attached ASan stack (both the UAF dereference and the free side) and the same 888-byte UAF at offset +864 also fires under unpatched content_browsertests via the attached browsertest_snippet.cc, so the patch is a build-env workaround, not a bug-enabler
the attached asan_trace_webdirect.txt is the full trace from real chrome (not browsertests) produced by running the command in the repro section. excerpts:
==4176923==ERROR: MiraclePtr: dangling-pointer-instantiation on address 0x7556754703e0
#1 base::(anonymous namespace)::Log(...) base/memory/raw_ptr_asan_service.cc:829:3
#2 base::RawPtrAsanService::CrashOnDanglingInstantiation(...) base/memory/raw_ptr_asan_service.cc:853:3
#3 storage::TaskRunnerBoundObserverList<storage::FileChangeObserver>::Notify<...>
#4 storage::ObfuscatedFileUtil::DeleteFile(...) storage/browser/file_system/obfuscated_file_util.cc:814:32
...
#15 base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:473:36
#16 base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
#17 base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
==4176923==ERROR: AddressSanitizer: heap-use-after-free on address 0x7556754703e0
READ of size 8 at 0x7556754703e0 thread T0 (chrome)
#0 base::internal::Invoker<..., UnretainedWrapper<storage::FileChangeObserver,
base::unretained_traits::MayNotDangle, ...>, ...>::RunOnce(...)
base/functional/bind_internal.h:740:12
#1 base::TaskAnnotator::RunTaskImpl(base::PendingTask&)
#2 base::sequence_manager::...::ThreadControllerWithMessagePumpImpl::DoWorkImpl
#3 ...::DoWork()
#4 base::MessagePumpGlib::HandleDispatch() base/message_loop/message_pump_glib.cc:736
...
#11 base::RunLoop::Run(base::Location const&) base/run_loop.cc:135:14
#12 content::BrowserMainLoop::RunMainMessageLoop() content/browser/browser_main_loop.cc:1103
...
#20 ChromeMain chrome/app/chrome_main.cc:194:12
#21 __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
0x7556754703e0 is located 864 bytes inside of 888-byte region [0x755675470080,0x7556754703f8)
freed by thread T0 (chrome) here:
#0 operator delete(void*)
#1 content::FileSystemAccessWatcherManager::~FileSystemAccessWatcherManager()
#2 content::FileSystemAccessManagerImpl::~FileSystemAccessManagerImpl()
content/browser/file_system_access/file_system_access_manager_impl.cc:459
#5 content::StoragePartitionImpl::~StoragePartitionImpl()
content/browser/storage_partition_impl.cc:1153
#9 content::StoragePartitionImplMap::~StoragePartitionImplMap()
#10 content::BrowserContextImpl::ShutdownStoragePartitions()
#11 OffTheRecordProfileImpl::~OffTheRecordProfileImpl()
chrome/browser/profiles/off_the_record_profile_impl.cc:278
#14 ProfileImpl::DestroyOffTheRecordProfile(Profile*)
#15 ProfileDestroyer::DestroyOffTheRecordProfileNow(Profile*)
chrome/browser/profiles/profile_destroyer.cc:251
#16 ProfileDestroyer::Start(...)
chrome/browser/profiles/profile_destroyer.cc:452
#17 ProfileDestroyer::DestroyOTRProfileWhenAppropriateWithTimeout(...)
chrome/browser/profiles/profile_destroyer.cc:221
#18 BrowserManagerService::DeleteBrowser(Browser*)
chrome/browser/ui/browser_manager_service.cc:129
...
previously allocated by thread T0 (chrome) here:
#0 operator new(unsigned long)
#1 content::FileSystemAccessWatcherManager::FileSystemAccessWatcherManager(...)
#2 content::FileSystemAccessManagerImpl::FileSystemAccessManagerImpl(...)
content/browser/file_system_access/file_system_access_manager_impl.cc:450
#4 content::StoragePartitionImpl::Initialize(...)
content/browser/storage_partition_impl.cc:1369
...
#17 (anonymous namespace)::GetPrivateProfileIfRequested(...)
chrome/browser/ui/startup/startup_browser_creator.cc:302
#18 StartupBrowserCreator::ProcessCmdLineImpl(...)
suggested fix, infra-level so it also covers 504632288:
// storage/browser/file_system/task_runner_bound_observer_list.h
// on the PostTask branch at line 73-76, replace base::Unretained(observer.first)
// with a WeakPtr-based binding, or require observers to expose a cancelable
// token the dispatcher can check at the call site.
or watcher-local, mirroring the cfafd4297bbd2 pattern from the sibling CL:
// ~FileSystemAccessBucketPathWatcher posts a fence on file_task_runner that
// drains in-flight ops before returning. ~FileSystemAccessManagerImpl gates
// on that fence. any pending Notify PostTasks either fire against a still-alive
// watcher or are never posted.
attached:
poc.html, the web-direct PoC (OPFS + FileSystemObserver + 40 infinite 4MB write chains + window.close())server.py, tiny Python localhost HTTP server for serving poc.htmlasan_trace_webdirect.txt, full ASan trace from real chrome (231 lines)browsertest_snippet.cc, optional deterministic browsertest driver that reproduces the same UAF synchronously for debugging convenience
Impact analysis
browser-process heap-UAF on a real production object driven end-to-end from web content. the FileSystemObserver + OPFS prerequisites are status: "stable" on desktop per runtime_enabled_features.json5:2771-2781, reachable from any secure context. the incognito teardown trigger is driven by the same production path an end user hits when closing their last incognito window, because kDestroyProfileOnBrowserClose is default-on on Linux/Mac/Win and the trace bottoms out at BrowserManagerService::DeleteBrowser
mitigation posture in shipping Chrome, to set expectations up front. MiraclePtr/BRP doesn't cover the observer map because it stores raw FileChangeObserver* rather than raw_ptr<T>. the sibling CL cfafd4297bbd2 for bug 497429850 called this out in its commit message: "Earlier refactor attempts using raw_ptr triggered failures due to widespread reliance on lazy/delayed object destruction in the file system infrastructure." CFI-vcall applies at the dispatch but two production FileChangeObserver subclasses satisfy the check, LocalFileChangeTracker and FileSystemAccessBucketPathWatcher, both .text-fixed, so a browser-process pointer leak defeats CFI. UnretainedWrapper<..., MayNotDangle> runs raw_ptr<T>::ReportIfDangling() before extraction and kPartitionAllocUnretainedDanglingPtr is FEATURE_ENABLED_BY_DEFAULT with mode kCrash in stable (partition_alloc_features.cc:34-48), and you can see the MiraclePtr-level CrashOnDanglingInstantiation fire ahead of the ASan UAF in the attached trace. on a stable official build that CHECK turns the UAF into a browser-process abort rather than attacker-controlled dispatch
the underlying corruption primitive is still a production UAF on an 888-byte object, just gated behind the dangling-ptr CHECK. I haven't closed the loop on bypassing that CHECK (allocator partition edges, Lockdown Mode paths, etc.), so the exploit-class ceiling is an open question I'd appreciate a read on. my best guess is the shipping-stable manifestation is a remote browser-process crash from any HTTPS origin with OPFS plus the user closing their last incognito window mid-OPFS-activity
infrastructure overlap with 504632288 is direct, same TaskRunnerBoundObserverList::Notify dispatch and same base::Unretained-outlives-observer pattern. an infra-level fix to the observer-list Notify dispatch closes both bugs. a watcher-local drain would only close this one. 504632288 was closed Not Reproducible because its repro was a unit test that manually orchestrated the free and the Notify. this report drives it from real Chrome via FileSystemObserver.observe() + OPFS writes + the production incognito close path
The cause
What version of Chrome have you found the security issue in?
149.0.7806.0 dev (HEAD 02fe3add0ed5, 2026-04-21)
Is the security issue related to a crash?
Yes, it is related to a crash.
Choose the type of vulnerability
Memory Corruption
How would you like to be publicly acknowledged for your report?
Andrew Boni
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 observer list posts callbacks bound with base::Unretained, so a queued notification can outlive the watcher that is destroyed during profile teardown.
Impact
On stable builds the dangling-pointer check likely turns this into a remote browser-process crash from any secure origin, rather than attacker-controlled dispatch.
What the attacker needed
Victim visits attacker page; OPFS and FileSystemObserver available; victim closes last incognito window
The fix
The observer-list notification should bind a weak reference or cancelable token instead of a raw pointer, or the watcher destructor should drain in-flight operations before returning.
How it was found
- Build an ASan Chrome and serve the proof-of-concept page from a local Python server.
- Launch headless incognito Chrome with the FileSystemObserver feature enabled and open the page.
- The page opens OPFS, registers a FileSystemObserver, and starts many large write chains to saturate the file task runner.
- After six seconds the page closes its own window, which is the last incognito window, tearing down the profile and the watcher.
- The UI message pump then runs the queued callback against the freed watcher, and ASan reports the use-after-free.
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.
When a file write finishes, the browser queues a small task to tell a 'watcher' object about it. If the window is closed first, that watcher is deleted, but the queued task still runs and touches the freed memory. This is called a use-after-free: using something after it has been thrown away.
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.