AddressSanitizer: heap-use-after-free on mozilla::a11y::NotificationController::WillRefresh -> get
A use-after-free occurs in Firefox's accessibility notification controller when a page repeatedly loads invalid media into an embed element and the user then clicks it. An attacker could crash the browser tab by getting a victim to open a crafted page and click the embedded element.
Originally disclosed on Mozilla
- Fixed in 19 days
- Paid in 23 days
- Disclosed after 19 days
Created attachment 9527148 testcase1.html
When repeatedly load invalid media src to <embed> element using requestIdleCallback, then after a click to the <embed> element, it able to crash with AddressSanitizer: heap-use-after-free on mozilla::a11y::NotificationController::WillRefresh
Tested on
- Firefox Beta ASan 146.0b4 (64-bit)
- Firefox Nightly ASan 147.0a1 (2025-11-17) (64-bit)
Steps to reproduce
- Open Firefox Nightly or Firefox ASan Nightly
- Make sure Accessibility set to
true(in about:support) - Visit attached testcase1.html
- Click on the
<embed>media element - Firefox tab crashes with
AddressSanitizer: heap-use-after-free on mozilla::a11y::NotificationController::WillRefresh
If it still doesn't crash, try clicking the <embed> media element multiple times.
When using mozregression, I found the crash is possible after commit Bug 1997773 - Consider hiding the frame loader earlier in nsFrameLoader::Destroy
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 accessibility NotificationController keeps a reference to a frame loader or related object that is destroyed earlier during teardown, so a later refresh touches freed memory.
Impact
A crafted page could crash the browser tab when the victim clicks the embedded element, but only with accessibility enabled and only a crash is demonstrated.
What the attacker needed
Accessibility enabled; victim visits a crafted page; victim clicks the embed element
How it was found
- Open Firefox Nightly or an ASan build.
- Ensure accessibility is enabled in about:support.
- Visit the crafted test page.
- Click the embed media element, repeating if needed, to trigger the crash.
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.
A use-after-free is a memory bug where a program keeps using a piece of memory after it has been freed, so the data there can be garbage or controlled by someone else. Here the browser's accessibility code, which helps screen readers understand the page, still refers to an object that was already destroyed. The result shown is a crash of the tab, not proven code execution.
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.