Skip to content
Memory corruption Advisory Advanced CVE-2026-15133

Use after free in InterestGroups (CVE-2026-15133)

A V8 lazy accessor for the deprecated browserSignals.renderUrl field stored a raw pointer to a stack-owned native object, and a microtask checkpoint run during timeout cleanup could invoke that accessor after the object had gone out of scope. An attacker could trigger a deterministic stack-use-after-scope memory-safety failure in the AuctionWorklet utility process via a web page.

Jihyeon Jeong Follow

Originally disclosed on Chrome VRP

Bounty$500 High View original
  • Fix shipped in 15 days

Report description

AuctionWorklet reportWin timeout triggers use-after-scope in deprecated renderUrl lazy getter


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

This is a lifetime bug in the Protected Audience AuctionWorklet V8 boundary. A V8-visible lazy accessor stores a raw pointer to a stack-owned native object as callback data. Under a reportWin() timeout, a pending JavaScript microtask can later invoke that accessor after the native stack object has already gone out of scope, producing an ASan stack-use-after-scope in the AuctionWorklet utility process.

The vulnerable callback-data pattern is in content/services/auction_worklet/lazy_filler.cc. LazyFiller::DefineLazyAttribute() installs a V8 lazy data property and passes v8::External::New(isolate, this, tag_) as the accessor data. LazyFiller::GetSelf<T>() later recovers that pointer from info.Data().

Relevant source:

  • content/services/auction_worklet/lazy_filler.h:21-25 documents the lifetime invariant: the associated V8 context must be destroyed immediately after the LazyFiller to avoid UAF.
  • content/services/auction_worklet/lazy_filler.cc:38-43 stores raw this in V8 callback data with v8::External::New(isolate, this, tag_).
  • content/services/auction_worklet/lazy_filler.h:55-57 recovers the raw native pointer from the V8 callback data.
  • content/services/auction_worklet/deprecated_url_lazy_filler.cc:38-48 uses the recovered DeprecatedUrlLazyFiller* and dereferences self->v8_logger_, self->warning_, and self->url_.

The affected accessor is the deprecated lowercase-camelcase alias browserSignals.renderUrl in bidder reportWin() browser signals. The current field is browserSignals.renderURL; the deprecated alias is implemented through DeprecatedUrlLazyFiller so it can warn and lazily return the same URL. Accessing browserSignals.renderURL does not hit this DeprecatedUrlLazyFiller path, but accessing browserSignals.renderUrl does.

In BidderWorklet::V8State::ReportWin() the local lifetime order is unsafe on the timeout path:

  • content/services/auction_worklet/bidder_worklet.cc:1135 declares ContextRecyclerScope context_recycler_scope(context_recycler);.
  • content/services/auction_worklet/bidder_worklet.cc:1179-1182 later declares stack object DeprecatedUrlLazyFiller deprecated_render_url(...).
  • content/services/auction_worklet/bidder_worklet.cc:1187-1199 passes &deprecated_render_url into SetBrowserSignals(), which installs the deprecated browserSignals.renderUrl lazy accessor.
  • content/services/auction_worklet/bidder_worklet.cc:1295-1308 returns on non-success, including Result::kTimeout.

Because C++ destroys local variables in reverse declaration order, deprecated_render_url is destroyed before context_recycler_scope during function unwind. However, ContextRecyclerScope::~ContextRecyclerScope() calls ContextRecycler::ResetForReuse():

  • content/services/auction_worklet/context_recycler.cc:185-190 calls v8_helper_->isolate()->PerformMicrotaskCheckpoint().
  • content/services/auction_worklet/context_recycler.cc:217-219 calls ResetForReuse() from the ContextRecyclerScope destructor.

This creates the bad ordering:

  1. reportWin() receives browserSignals.
  2. JavaScript saves browserSignals and queues a Promise microtask that reads deprecated browserSignals.renderUrl.
  3. reportWin() times out, so normal script completion does not run the microtask before stack unwind.
  4. BidderWorklet::V8State::ReportWin() unwinds and destroys stack DeprecatedUrlLazyFiller deprecated_render_url.
  5. ContextRecyclerScope is destroyed after that and runs ResetForReuse().
  6. ResetForReuse() performs a V8 microtask checkpoint while the V8 context still contains the saved browserSignals object.
  7. The queued microtask reads browserSignals.renderUrl, invoking DeprecatedUrlLazyFiller::HandleDeprecatedUrl() with callback data pointing to the already-destroyed stack object.
  8. The getter dereferences the dangling DeprecatedUrlLazyFiller*, causing ASan stack-use-after-scope.

Steps to reproduce

The attached PoC consists of server.py and poc.html. server.py is the file to run; it serves the top-level page plus the bidder, seller, ad, trusted-bidding-signals, and reporting endpoints required by the Protected Audience flow.

  1. Start the local HTTPS PoC server:
Bash
python3 server.py --host 127.0.0.1 --port 8443

The server prints the URL to open, for example:

Text
https://127.0.0.1:8443/

If cert.pem and key.pem are not present, the server creates a short-lived self-signed certificate with openssl.

  1. In another terminal, run an ASan Chrome build against the printed URL:
Bash
rm -rf /tmp/pa-uaf-profile
mkdir -p /tmp/pa-uaf-profile/Default
cat > /tmp/pa-uaf-profile/Default/Preferences <<'JSON'
{
  "privacy_sandbox": {
    "m1": {
      "fledge_enabled": true
    }
  }
}
/path/to/chrome \
  --headless=new \
  --user-data-dir=/tmp/pa-uaf-profile \
  --ignore-certificate-errors \
  --disable-features=EnforcePrivacySandboxAttestations,PrivacySandboxAdPrivacyUxDeprecation \
  'https://127.0.0.1:8443/'

The profile pre-seed is required for this headless local ASan reproduction because a clean Chrome profile has privacy_sandbox.m1.fledge_enabled defaulting to false; without that pref, the page does not reach the AuctionWorklet reportWin() path. Instead of editing the Preferences file, the same browser-side setting can also be enabled interactively through chrome://settings/adPrivacy/sites (Ad privacy -> Site-suggested ads) on a non-headless profile.

The remaining Chrome flags are intentionally minimal for this local repro: --headless=new for automation, --user-data-dir for the pre-seeded profile, --ignore-certificate-errors for the self-signed local HTTPS server, and --disable-features=EnforcePrivacySandboxAttestations,PrivacySandboxAdPrivacyUxDeprecation to avoid local-origin enrollment blocking and startup clearing of the pre-seeded Site-suggested ads pref. I verified that no ASAN_OPTIONS and no --enable-privacy-sandbox-ads-apis switch are required.

Bisect

I narrowed the regression to the following Chromium commit:

Gerrit CL: https://chromium-review.googlesource.com/c/chromium/src/+/7877578

Commit: 5cfe401fdda609ebf3333c2733b78e3e585207fe (FLEDGE: Fix wrong timing of microtask checkpoint execution)

The commit adds a microtask checkpoint to ContextRecycler::ResetForReuse():

C++
// Make sure that microtasks get flushed as they would not on timeout.
{
  AuctionV8Helper::TimeLimitScope time_scope(v8_helper_->GetTimeLimit());
  v8_helper_->isolate()->PerformMicrotaskCheckpoint();
}

This matches the source-level root cause: the newly added timeout cleanup checkpoint can run a queued Promise microtask after BidderWorklet::V8State::ReportWin() has already destroyed stack DeprecatedUrlLazyFiller deprecated_render_url, while the V8 browserSignals.renderUrl accessor still contains callback data pointing at that stack object.

Impact analysis

This gives a deterministic, web-triggerable memory-safety failure in the AuctionWorklet execution path. In non-ASan builds, the same stale callback-data use is undefined native behavior and depends on how the expired stack slot is reused before the delayed accessor runs. The affected state includes native object fields that are consumed by the callback, so the bug is more than a benign JavaScript exception or ordinary process termination path.


The cause

What version of Chrome have you found the security issue in?

151.0.7905.0

Is the security issue related to a crash?

Yes, it is related to a crash.

Choose the type of vulnerability

Memory Corruption

The original report as published on the Chromium issue tracker, by Jihyeon Jeong (Compsec Lab, Seoul National University / Research Intern). Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

Protected Audience (formerly FLEDGE) runs bidding and reporting logic inside a dedicated utility process, the AuctionWorklet. Bidder and seller scripts execute in V8 there, and the browser exposes native state to those scripts through lazy accessors: properties that are only materialised when JavaScript reads them. The LazyFiller machinery in content/services/auction_worklet/lazy_filler.cc implements this pattern. LazyFiller::DefineLazyAttribute() installs a V8 lazy data property and passes v8::External::New(isolate, this, tag_) as the accessor data, so the callback carries a raw pointer to the native LazyFiller instance. LazyFiller::GetSelf<T>() later recovers that pointer from info.Data().

One of the accessors built on this machinery is the deprecated lowercase-camelcase alias browserSignals.renderUrl in bidder reportWin() browser signals. The current field is browserSignals.renderURL; the deprecated alias is implemented through DeprecatedUrlLazyFiller so it can emit a warning and lazily return the same URL. Reading browserSignals.renderURL does not touch the DeprecatedUrlLazyFiller path, but reading browserSignals.renderUrl does.

The bug reported here is a lifetime violation at that V8 boundary: a V8-visible lazy accessor keeps a raw pointer to a stack-owned native object as callback data, and under a reportWin() timeout a pending JavaScript microtask can invoke the accessor after the native stack object has gone out of scope. The result is an ASan stack-use-after-scope in the AuctionWorklet utility process.

Setup

The reproduction is a local HTTPS server plus an ASan Chrome build. The PoC consists of two files, server.py and poc.html. server.py is the file to run; it serves the top-level page plus the bidder, seller, ad, trusted-bidding-signals and reporting endpoints required by the Protected Audience flow. If cert.pem and key.pem are not present, the server creates a short-lived self-signed certificate with openssl.

The report was filed under the Chrome VRP.

One precondition matters for headless local reproduction: a clean Chrome profile has privacy_sandbox.m1.fledge_enabled defaulting to false, and without that pref the page does not reach the AuctionWorklet reportWin() path. The profile therefore has to be pre-seeded.

Finding it

The starting point is the documented lifetime invariant in content/services/auction_worklet/lazy_filler.h:21-25: the associated V8 context must be destroyed immediately after the LazyFiller to avoid a use-after-free. The implementation at content/services/auction_worklet/lazy_filler.cc:38-43 stores raw this in V8 callback data with v8::External::New(isolate, this, tag_), and content/services/auction_worklet/lazy_filler.h:55-57 recovers the raw native pointer from that callback data. content/services/auction_worklet/deprecated_url_lazy_filler.cc:38-48 then uses the recovered DeprecatedUrlLazyFiller* and dereferences self->v8_logger_, self->warning_ and self->url_.

In BidderWorklet::V8State::ReportWin() the local lifetime order is unsafe on the timeout path:

  • content/services/auction_worklet/bidder_worklet.cc:1135 declares ContextRecyclerScope context_recycler_scope(context_recycler);.
  • content/services/auction_worklet/bidder_worklet.cc:1179-1182 later declares the stack object DeprecatedUrlLazyFiller deprecated_render_url(...).
  • content/services/auction_worklet/bidder_worklet.cc:1187-1199 passes &deprecated_render_url into SetBrowserSignals(), which installs the deprecated browserSignals.renderUrl lazy accessor.
  • content/services/auction_worklet/bidder_worklet.cc:1295-1308 returns on non-success, including Result::kTimeout.

C++ destroys local variables in reverse declaration order, so deprecated_render_url is destroyed before context_recycler_scope during function unwind. That would be harmless if the context recycler scope did nothing on destruction, but ContextRecyclerScope::~ContextRecyclerScope() calls ContextRecycler::ResetForReuse():

  • content/services/auction_worklet/context_recycler.cc:185-190 calls v8_helper_->isolate()->PerformMicrotaskCheckpoint().
  • content/services/auction_worklet/context_recycler.cc:217-219 calls ResetForReuse() from the ContextRecyclerScope destructor.

So the destructor of the outer scope runs a microtask checkpoint after the inner stack object has already been destroyed, while the V8 context still holds the saved browserSignals object and its accessor still points at the dead stack slot.

Exploitation

Step 1: start the local HTTPS PoC server

Bash
python3 server.py --host [redacted] --port 8443

The server prints the URL to open, for example:

Text
https://[redacted]:8443/

Step 2: run an ASan Chrome build against the printed URL

Bash
rm -rf /tmp/pa-uaf-profile
mkdir -p /tmp/pa-uaf-profile/Default
cat > /tmp/pa-uaf-profile/Default/Preferences <<'JSON'
{
  "privacy_sandbox": {
    "m1": {
      "fledge_enabled": true
    }
  }
}
/path/to/chrome \
  --headless=new \
  --user-data-dir=/tmp/pa-uaf-profile \
  --ignore-certificate-errors \
  --disable-features=EnforcePrivacySandboxAttestations,PrivacySandboxAdPrivacyUxDeprecation \
  'https://[redacted]:8443/'

The profile pre-seed is required for this headless local ASan reproduction because a clean Chrome profile has privacy_sandbox.m1.fledge_enabled defaulting to false; without that pref, the page does not reach the AuctionWorklet reportWin() path. Instead of editing the Preferences file, the same browser-side setting can also be enabled interactively through chrome://settings/adPrivacy/sites (Ad privacy -> Site-suggested ads) on a non-headless profile.

The remaining Chrome flags are intentionally minimal for this local repro: --headless=new for automation, --user-data-dir for the pre-seeded profile, --ignore-certificate-errors for the self-signed local HTTPS server, and --disable-features=EnforcePrivacySandboxAttestations,PrivacySandboxAdPrivacyUxDeprecation to avoid local-origin enrollment blocking and startup clearing of the pre-seeded Site-suggested ads pref. I verified that no ASAN_OPTIONS and no --enable-privacy-sandbox-ads-apis switch are required.

Step 3: the ordering that produces the crash

The bad ordering is:

  1. reportWin() receives browserSignals.
  2. JavaScript saves browserSignals and queues a Promise microtask that reads deprecated browserSignals.renderUrl.
  3. reportWin() times out, so normal script completion does not run the microtask before stack unwind.
  4. BidderWorklet::V8State::ReportWin() unwinds and destroys stack DeprecatedUrlLazyFiller deprecated_render_url.
  5. ContextRecyclerScope is destroyed after that and runs ResetForReuse().
  6. ResetForReuse() performs a V8 microtask checkpoint while the V8 context still contains the saved browserSignals object.
  7. The queued microtask reads browserSignals.renderUrl, invoking DeprecatedUrlLazyFiller::HandleDeprecatedUrl() with callback data pointing to the already-destroyed stack object.
  8. The getter dereferences the dangling DeprecatedUrlLazyFiller*, causing ASan stack-use-after-scope.

Root cause

The mistake is a lifetime mismatch between a V8-visible lazy accessor and the native stack object it points at. LazyFiller::DefineLazyAttribute() stores raw this in the accessor data, and the header documents the invariant that the associated V8 context must be destroyed immediately after the LazyFiller. In BidderWorklet::V8State::ReportWin() the DeprecatedUrlLazyFiller is a stack local declared after the ContextRecyclerScope, so it is destroyed first, while the context recycler scope's destructor still runs a microtask checkpoint afterwards. Any microtask that reads the deprecated accessor at that point dereferences freed stack memory.

The regression was narrowed to a specific Chromium commit:

Gerrit CL: https://chromium-review.googlesource.com/c/chromium/src/+/7877578

Commit: [redacted] (FLEDGE: Fix wrong timing of microtask checkpoint execution)

The commit adds a microtask checkpoint to ContextRecycler::ResetForReuse():

C++
// Make sure that microtasks get flushed as they would not on timeout.
{
  AuctionV8Helper::TimeLimitScope time_scope(v8_helper_->GetTimeLimit());
  v8_helper_->isolate()->PerformMicrotaskCheckpoint();
}

This matches the source-level root cause: the newly added timeout cleanup checkpoint can run a queued Promise microtask after BidderWorklet::V8State::ReportWin() has already destroyed stack DeprecatedUrlLazyFiller deprecated_render_url, while the V8 browserSignals.renderUrl accessor still contains callback data pointing at that stack object.

Impact

The result is a deterministic, web-triggerable memory-safety failure in the AuctionWorklet execution path. In non-ASan builds, the same stale callback-data use is undefined native behaviour and depends on how the expired stack slot is reused before the delayed accessor runs. The affected state includes native object fields that are consumed by the callback, so the bug is more than a benign JavaScript exception or ordinary process termination path.

Fix

The report does not describe a fix. The commit identified as the regression is the one that introduced the microtask checkpoint in ContextRecycler::ResetForReuse(), not a remediation.

Variants to test

  • Other lazy accessors built on LazyFiller in the AuctionWorklet. A positive result is an ASan stack-use-after-scope when a microtask reads the accessor after the owning stack object has been destroyed.
  • Other paths that reach ContextRecycler::ResetForReuse() after a timeout. A positive result is a microtask checkpoint running while a saved V8 object still references a destroyed native filler.
  • The non-deprecated browserSignals.renderURL accessor. The report states that reading it does not hit the DeprecatedUrlLazyFiller path, so a positive result here would indicate a different filler with the same lifetime problem.
  • Non-ASan builds of the same PoC. A positive result is undefined native behaviour that depends on reuse of the expired stack slot, rather than a clean JavaScript exception or ordinary process termination.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 18 min read.

What happened, in plain words

Chrome has a feature that lets websites run small pieces of advertising logic inside the browser itself, in a separate, sandboxed helper process. One of those pieces of logic is a script called reportWin(), which a bidder supplies and which Chrome runs after an ad auction finishes, so the bidder can report what happened. Chrome gives that script a bundle of information called browserSignals.

Some of the values inside browserSignals are not computed up front. They are lazy: Chrome installs a small getter function that only goes and fetches the real value at the moment the script reads the property. To do that, the getter has to remember where the real value lives, and it remembers this as a raw memory address (a pointer) to a temporary object that sits on the program's call stack.

A stack is the region of memory a program uses for short-lived, function-local data. When a function returns, everything it put on the stack is gone. If something still holds a pointer to that gone data and later follows it, the program reads memory that no longer belongs to it. That class of bug is called a use-after-free (or, for stack data specifically, a stack-use-after-scope).

Here the temporary object is destroyed when reportWin() finishes, but a piece of JavaScript that the script queued earlier (a microtask, a small callback that runs just after the current code) is still waiting. Normally that microtask would run before the temporary object is destroyed. But when reportWin() times out, Chrome takes a shortcut: it tears the function down first, and only afterwards, while cleaning up, it runs the queued microtasks. The microtask then reads the lazy property, the getter follows its stale pointer, and the program touches memory that has already been released. Chrome's memory-error detector, AddressSanitizer (ASan), reports this as stack-use-after-scope.

The report was filed under the Chrome Vulnerability Reward Program (VRP).

Background you need first

A few ideas come up again and again, so here they are from zero.

  • Process: an operating system runs programs in isolated boxes called processes. If one process crashes or is compromised, the rest of the browser can keep going. Chrome puts risky work (like running third-party advertising scripts) in a separate utility process so a bug there does not automatically take down the whole browser.
  • V8: the JavaScript engine inside Chrome. It is the component that reads and executes JavaScript code.
  • API: an application programming interface is a defined set of functions and data that one piece of software offers to another. Think of a restaurant menu: you do not go into the kitchen, you order from the list. Here, the browser exposes a set of JavaScript-visible properties (the API) to the advertising scripts.
  • Protected Audience (formerly FLEDGE): a Chrome feature for privacy-preserving advertising. It runs an auction inside the browser, using scripts supplied by bidders and sellers, without sharing the user's browsing history with those parties. The part that actually executes those scripts is called the AuctionWorklet.
  • Bidder and seller scripts: in an ad auction, a bidder is the party offering an ad and a price; a seller runs the auction. Each supplies JavaScript that Chrome executes inside the AuctionWorklet.
  • Lazy accessor: a property whose value is only computed when someone reads it. Compare a light switch: the bulb is not lit until you flip it. In JavaScript, a getter is the function that runs when a property is read.
  • Pointer: a number that says where in memory something lives. Following a pointer to memory that has been released is the essence of a use-after-free.
  • Stack and stack frame: the stack is the scratch area for a running function's local variables. Each function call gets a slice of it (a frame). When the function returns, its frame is popped and its contents are no longer valid.
  • Microtask: a small callback queued to run immediately after the current piece of JavaScript finishes, before the browser moves on to other work. Promises use microtasks. A microtask checkpoint is the moment the engine stops and drains the queue of pending microtasks.
  • Timeout: a limit on how long a script may run. When it is exceeded, Chrome stops the script and treats the result as a failure.
  • ASan (AddressSanitizer): a debugging tool built into special Chrome builds that watches memory accesses and loudly reports any use of memory that has been freed or gone out of scope. It is how the researcher could see the bug reliably.
  • Self-signed certificate: a security certificate that a server makes for itself instead of buying one from an authority. Browsers normally warn about these; the test setup tells Chrome to accept it.

Context: where the bug lives

Protected Audience runs bidding and reporting logic inside the AuctionWorklet utility process. Bidder and seller scripts execute in V8 there, and the browser exposes native state to those scripts through lazy accessors: properties that are only materialised when JavaScript reads them. The LazyFiller machinery in content/services/auction_worklet/lazy_filler.cc implements this pattern. LazyFiller::DefineLazyAttribute() installs a V8 lazy data property and passes v8::External::New(isolate, this, tag_) as the accessor data, so the callback carries a raw pointer to the native LazyFiller instance. LazyFiller::GetSelf<T>() later recovers that pointer from info.Data().

In plain terms: DefineLazyAttribute() is the function that sets up the lazy property. It hands V8 a small package of accessor data (the thing the getter will receive when it runs). That package is created with v8::External::New(isolate, this, tag_), where this is the address of the native object doing the filling. Later, GetSelf<T>() takes that package back out of info.Data() and turns it into a usable pointer again. The danger is that the address is raw: nothing keeps the object alive, and nothing notices if it dies.

One of the accessors built on this machinery is the deprecated lowercase-camelcase alias browserSignals.renderUrl in bidder reportWin() browser signals. The current field is browserSignals.renderURL; the deprecated alias is implemented through DeprecatedUrlLazyFiller so it can emit a warning and lazily return the same URL. Reading browserSignals.renderURL does not touch the DeprecatedUrlLazyFiller path, but reading browserSignals.renderUrl does.

Deprecated means "still works, but you should stop using it". Chrome keeps the old spelling renderUrl alive so old scripts do not break, and it warns the script author to switch to the new spelling renderURL. The two spellings differ only in the capitalisation of the last three letters, which is exactly why the bug is easy to miss: one spelling is safe, the other is not.

The bug reported here is a lifetime violation at that V8 boundary: a V8-visible lazy accessor keeps a raw pointer to a stack-owned native object as callback data, and under a reportWin() timeout a pending JavaScript microtask can invoke the accessor after the native stack object has gone out of scope. The result is an ASan stack-use-after-scope in the AuctionWorklet utility process.

Setup: what you need to reproduce it

The reproduction is a local HTTPS server plus an ASan Chrome build. The PoC consists of two files, server.py and poc.html. server.py is the file to run; it serves the top-level page plus the bidder, seller, ad, trusted-bidding-signals and reporting endpoints required by the Protected Audience flow. If cert.pem and key.pem are not present, the server creates a short-lived self-signed certificate with openssl.

Why a local server? Protected Audience needs several cooperating web endpoints (the page, the bidder script, the seller script, the ad, the trusted bidding signals, the reporting endpoint). Rather than depend on real websites, the PoC serves all of them from your own machine. HTTPS is used for the local server, and openssl is the standard command-line tool for making certificates.

The issue was found in Chrome 151.0.7905.0. The report was filed under the Chrome VRP and rated high severity, with a bounty of 500.00 USD; it was disclosed on 2026-07-08.

One precondition matters for headless local reproduction: a clean Chrome profile has privacy_sandbox.m1.fledge_enabled defaulting to false, and without that pref the page does not reach the AuctionWorklet reportWin() path. The profile therefore has to be pre-seeded.

A profile is the folder where Chrome keeps a user's settings. A pref is one named setting inside it. privacy_sandbox.m1.fledge_enabled is the switch that turns the Protected Audience machinery on. On a brand-new profile it is off, so the test page would simply do nothing; the setup writes it to true before Chrome starts.

Finding it: reading the code

The starting point is the documented lifetime invariant in content/services/auction_worklet/lazy_filler.h:21-25: the associated V8 context must be destroyed immediately after the LazyFiller to avoid a use-after-free. The implementation at content/services/auction_worklet/lazy_filler.cc:38-43 stores raw this in V8 callback data with v8::External::New(isolate, this, tag_), and content/services/auction_worklet/lazy_filler.h:55-57 recovers the raw native pointer from that callback data. content/services/auction_worklet/deprecated_url_lazy_filler.cc:38-48 then uses the recovered DeprecatedUrlLazyFiller* and dereferences self->v8_logger_, self->warning_ and self->url_.

An invariant is a rule that must always hold for the code to be correct. Here the rule is: the V8 context (the JavaScript world the property lives in) must be torn down immediately after the LazyFiller object, never later. The header file states this rule in a comment. The .cc file then does the thing the rule is meant to protect: it stores this (the address of the filler) inside V8. The deprecated URL filler later follows that address and reads three fields from it: v8_logger_, warning_ and url_. If the object is gone, all three reads are invalid.

In BidderWorklet::V8State::ReportWin() the local lifetime order is unsafe on the timeout path:

  • content/services/auction_worklet/bidder_worklet.cc:1135 declares ContextRecyclerScope context_recycler_scope(context_recycler);.
  • content/services/auction_worklet/bidder_worklet.cc:1179-1182 later declares the stack object DeprecatedUrlLazyFiller deprecated_render_url(...).
  • content/services/auction_worklet/bidder_worklet.cc:1187-1199 passes &deprecated_render_url into SetBrowserSignals(), which installs the deprecated browserSignals.renderUrl lazy accessor.
  • content/services/auction_worklet/bidder_worklet.cc:1295-1308 returns on non-success, including Result::kTimeout.

Line by line:

  1. ContextRecyclerScope context_recycler_scope(context_recycler); creates a helper object whose job is to recycle the JavaScript context when the function ends. It is declared first, so it will be destroyed last.
  2. DeprecatedUrlLazyFiller deprecated_render_url(...) creates the temporary object that will back the deprecated property. It is declared later, so it will be destroyed earlier.
  3. SetBrowserSignals() is given the address of that temporary object (&deprecated_render_url) and uses it to install the lazy browserSignals.renderUrl getter. From this moment, V8 holds a pointer to the temporary object.
  4. The function returns early on any non-success result, including Result::kTimeout. That early return is what triggers the unwinding described next.

C++ destroys local variables in reverse declaration order, so deprecated_render_url is destroyed before context_recycler_scope during function unwind. That would be harmless if the context recycler scope did nothing on destruction, but ContextRecyclerScope::~ContextRecyclerScope() calls ContextRecycler::ResetForReuse():

  • content/services/auction_worklet/context_recycler.cc:185-190 calls v8_helper_->isolate()->PerformMicrotaskCheckpoint().
  • content/services/auction_worklet/context_recycler.cc:217-219 calls ResetForReuse() from the ContextRecyclerScope destructor.

Reverse declaration order is the rule C++ uses for local variables: the last one created is the first one destroyed, like a stack of plates. So the temporary filler goes away first, and the recycler scope goes away second. The recycler scope's destructor calls ResetForReuse(), which calls PerformMicrotaskCheckpoint(), which runs any queued microtasks. That is the fatal combination: the microtask runs after the filler is gone, but the getter still points at it.

Exploitation: step by step

Step 1: start the local HTTPS PoC server

Bash
python3 server.py --host [redacted] --port 8443

This runs the Python script server.py with the Python 3 interpreter. --host [redacted] tells it to listen only on the local loopback address (your own machine, not the network). --port 8443 picks the port number; 8443 is a common choice for local HTTPS because 443 is usually taken. The server prints the URL to open, for example:

Text
https://[redacted]:8443/

That is the address you will point Chrome at.

Step 2: run an ASan Chrome build against the printed URL

Bash
rm -rf /tmp/pa-uaf-profile
mkdir -p /tmp/pa-uaf-profile/Default
cat > /tmp/pa-uaf-profile/Default/Preferences <<'JSON'
{
  "privacy_sandbox": {
    "m1": {
      "fledge_enabled": true
    }
  }
}
/path/to/chrome \
  --headless=new \
  --user-data-dir=/tmp/pa-uaf-profile \
  --ignore-certificate-errors \
  --disable-features=EnforcePrivacySandboxAttestations,PrivacySandboxAdPrivacyUxDeprecation \
  'https://[redacted]:8443/'

Line by line:

  1. rm -rf /tmp/pa-uaf-profile deletes any old test profile so you start clean. -r means recursive (folders too), -f means force (no questions).
  2. mkdir -p /tmp/pa-uaf-profile/Default creates the profile folder and its Default subfolder, which is where Chrome keeps the main profile's files. -p means create parent folders as needed and do not complain if they exist.
  3. cat > .../Preferences <<'JSON' writes the following block into the file Preferences. The <<'JSON' part is a here-document: everything until the line JSON is fed to cat as input. The quotes around JSON stop the shell from expanding anything inside.
  4. The JSON itself sets privacy_sandbox.m1.fledge_enabled to true, which is the pre-seed described above.
  5. /path/to/chrome is a placeholder for wherever your ASan Chrome binary lives.
  6. --headless=new runs Chrome without a visible window, which is convenient for automation.
  7. --user-data-dir=/tmp/pa-uaf-profile tells Chrome to use the profile folder you just prepared, so it picks up the pre-seeded pref.
  8. --ignore-certificate-errors makes Chrome accept the self-signed certificate from the local server.
  9. --disable-features=EnforcePrivacySandboxAttestations,PrivacySandboxAdPrivacyUxDeprecation turns off two features: the first would block a local origin that is not enrolled for the privacy sandbox, and the second would clear the pre-seeded Site-suggested ads pref at startup.
  10. 'https://[redacted]:8443/' is the page to open, quoted so the shell treats it as one argument.

The profile pre-seed is required for this headless local ASan reproduction because a clean Chrome profile has privacy_sandbox.m1.fledge_enabled defaulting to false; without that pref, the page does not reach the AuctionWorklet reportWin() path. Instead of editing the Preferences file, the same browser-side setting can also be enabled interactively through chrome://settings/adPrivacy/sites (Ad privacy -> Site-suggested ads) on a non-headless profile.

The remaining Chrome flags are intentionally minimal for this local repro: --headless=new for automation, --user-data-dir for the pre-seeded profile, --ignore-certificate-errors for the self-signed local HTTPS server, and --disable-features=EnforcePrivacySandboxAttestations,PrivacySandboxAdPrivacyUxDeprecation to avoid local-origin enrollment blocking and startup clearing of the pre-seeded Site-suggested ads pref. I verified that no ASAN_OPTIONS and no --enable-privacy-sandbox-ads-apis switch are required.

Step 3: the ordering that produces the crash

The bad ordering is:

  1. reportWin() receives browserSignals.
  2. JavaScript saves browserSignals and queues a Promise microtask that reads deprecated browserSignals.renderUrl.
  3. reportWin() times out, so normal script completion does not run the microtask before stack unwind.
  4. BidderWorklet::V8State::ReportWin() unwinds and destroys stack DeprecatedUrlLazyFiller deprecated_render_url.
  5. ContextRecyclerScope is destroyed after that and runs ResetForReuse().
  6. ResetForReuse() performs a V8 microtask checkpoint while the V8 context still contains the saved browserSignals object.
  7. The queued microtask reads browserSignals.renderUrl, invoking DeprecatedUrlLazyFiller::HandleDeprecatedUrl() with callback data pointing to the already-destroyed stack object.
  8. The getter dereferences the dangling DeprecatedUrlLazyFiller*, causing ASan stack-use-after-scope.

In plain words: the script stores the browserSignals object somewhere it will survive, and schedules a small callback that will read the old spelling renderUrl. Because the script times out, that callback does not get its normal chance to run before the function returns. The function returns, the temporary filler is destroyed, and only then does the cleanup code run the callback. The callback reads the lazy property, the getter follows its pointer into the destroyed object, and ASan reports the invalid access.

Root cause

The mistake is a lifetime mismatch between a V8-visible lazy accessor and the native stack object it points at. LazyFiller::DefineLazyAttribute() stores raw this in the accessor data, and the header documents the invariant that the associated V8 context must be destroyed immediately after the LazyFiller. In BidderWorklet::V8State::ReportWin() the DeprecatedUrlLazyFiller is a stack local declared after the ContextRecyclerScope, so it is destroyed first, while the context recycler scope's destructor still runs a microtask checkpoint afterwards. Any microtask that reads the deprecated accessor at that point dereferences freed stack memory.

The regression was narrowed to a specific Chromium commit:

Gerrit CL: https://chromium-review.googlesource.com/c/chromium/src/+/7877578

Commit: [redacted] (FLEDGE: Fix wrong timing of microtask checkpoint execution)

A regression is a bug that was not there before and was introduced by a change. Bisecting is the technique of narrowing down which change caused it, usually by testing the code at many points in its history. The commit adds a microtask checkpoint to ContextRecycler::ResetForReuse():

C++
// Make sure that microtasks get flushed as they would not on timeout.
{
  AuctionV8Helper::TimeLimitScope time_scope(v8_helper_->GetTimeLimit());
  v8_helper_->isolate()->PerformMicrotaskCheckpoint();
}

Line by line:

  1. The comment says the intent: make sure microtasks are flushed, because on a timeout they otherwise would not be.
  2. The braces create a small scope so the time-limit helper lives only for this block.
  3. AuctionV8Helper::TimeLimitScope time_scope(v8_helper_->GetTimeLimit()); applies the same time limit to this cleanup work, so it cannot run forever.
  4. v8_helper_->isolate()->PerformMicrotaskCheckpoint(); is the actual drain of the microtask queue. An isolate is V8's term for one independent JavaScript execution environment.

This matches the source-level root cause: the newly added timeout cleanup checkpoint can run a queued Promise microtask after BidderWorklet::V8State::ReportWin() has already destroyed stack DeprecatedUrlLazyFiller deprecated_render_url, while the V8 browserSignals.renderUrl accessor still contains callback data pointing at that stack object.

Impact

The result is a deterministic, web-triggerable memory-safety failure in the AuctionWorklet execution path. In non-ASan builds, the same stale callback-data use is undefined native behaviour and depends on how the expired stack slot is reused before the delayed accessor runs. The affected state includes native object fields that are consumed by the callback, so the bug is more than a benign JavaScript exception or ordinary process termination path. The report classifies the vulnerability as memory corruption and confirms it is related to a crash.

Deterministic means it happens every time, not just occasionally. Web-triggerable means a normal web page can set it off, without the user doing anything unusual. Undefined behaviour means the C++ standard gives no guarantee about what happens; in practice the program may read whatever value happens to be sitting in that reused memory slot, which is why the report says the outcome depends on reuse of the expired stack slot.

Fix

The report does not describe a fix. The commit identified as the regression is the one that introduced the microtask checkpoint in ContextRecycler::ResetForReuse(), not a remediation.

Variants to test

  • Other lazy accessors built on LazyFiller in the AuctionWorklet. A positive result is an ASan stack-use-after-scope when a microtask reads the accessor after the owning stack object has been destroyed.
  • Other paths that reach ContextRecycler::ResetForReuse() after a timeout. A positive result is a microtask checkpoint running while a saved V8 object still references a destroyed native filler.
  • The non-deprecated browserSignals.renderURL accessor. The report states that reading it does not hit the DeprecatedUrlLazyFiller path, so a positive result here would indicate a different filler with the same lifetime problem.
  • Non-ASan builds of the same PoC. A positive result is undefined native behaviour that depends on reuse of the expired stack slot, rather than a clean JavaScript exception or ordinary process termination.

Glossary

  • API: a defined set of functions and data one piece of software offers to another, like a menu you order from.
  • ASan (AddressSanitizer): a debugging tool in special builds that reports any use of memory that has been freed or gone out of scope.
  • AuctionWorklet: the separate Chrome utility process that runs Protected Audience bidder and seller scripts.
  • Bidder: the party in an ad auction that offers an ad and a price.
  • Bisect: to narrow down which code change introduced a bug by testing the code at many points in its history.
  • Bounty: a payment made to a researcher who reports a valid security bug.
  • BrowserSignals: the bundle of information Chrome passes to a bidder's reportWin() script.
  • Chrome VRP: Chrome Vulnerability Reward Program, the scheme under which Chrome pays for security reports.
  • Commit: a recorded change to a code repository.
  • Context (V8 context): one JavaScript world in which scripts run, with its own global objects and properties.
  • CVE: a public identifier assigned to a specific security vulnerability.
  • Deprecated: still supported but discouraged, usually because a newer replacement exists.
  • Deterministic: happens every time, not just occasionally.
  • Dereference: to follow a pointer and read or write the memory it points at.
  • FLEDGE: the former name of Protected Audience.
  • Getter: a function that runs automatically when a property is read.
  • Headless: running a browser without a visible window, usually for automation.
  • Here-document: a shell feature that feeds a block of text to a command as input.
  • HTTPS: HTTP with encryption, required for many modern browser features.
  • Invariant: a rule that must always hold for the code to be correct.
  • Isolate: V8's term for one independent JavaScript execution environment.
  • Memory corruption: a bug where a program reads or writes memory it should not, often leading to crashes or worse.
  • Microtask: a small callback queued to run right after the current JavaScript finishes.
  • Microtask checkpoint: the moment the engine stops and runs all pending microtasks.
  • Pointer: a value that says where in memory something lives.
  • PoC (proof of concept): a minimal setup that demonstrates a bug.
  • Pref: a named setting stored in a Chrome profile.
  • Process: an isolated running program managed by the operating system.
  • Profile: the folder where Chrome keeps a user's settings and data.
  • Protected Audience: Chrome's privacy-preserving advertising feature, formerly FLEDGE.
  • Raw pointer: a pointer with no automatic lifetime management; nothing keeps the target alive.
  • Regression: a bug introduced by a change that did not exist before.
  • reportWin(): the bidder-supplied script Chrome runs after an auction to report the result.
  • Self-signed certificate: a certificate a server makes for itself rather than obtaining from an authority.
  • Seller: the party that runs an ad auction.
  • Stack: the memory area holding a running function's local variables.
  • Stack frame: the slice of the stack belonging to one function call.
  • Stack-use-after-scope: using memory that belonged to a variable whose scope has already ended.
  • Timeout: a limit on how long a script may run before Chrome stops it.
  • Undefined behaviour: a situation the language standard gives no guarantee about; anything may happen.
  • Use-after-free: using memory after it has been released.
  • Utility process: a separate, sandboxed Chrome process used for risky work.
  • V8: Chrome's JavaScript engine.
  • Web-triggerable: reachable from an ordinary web page without unusual user action.

More by Jihyeon Jeong

View all

12 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.