Inappropriate implementation in NFC (CVE-2026-95370)
A logic flaw in WebNFC on Android lets a hidden or background tab keep NFC operations active, because the suspend signal is sent before the NFC implementation object exists and is then silently dropped. A page that already holds NFC permission could covertly read, write or permanently lock physical NFC tags while the user is elsewhere.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A potential logic vulnerability in WebNFC on Android allows a hidden or background tab to bypass visibility-suspend privacy and hardware-access controls. This enables a background page with prior NFC permissions to covertly read, write, or permanently lock physical NFC tags. The bypass is caused by incorrect Mojo message sequencing during initial bind and a lack of state tracking during subsequent rebind requests.
Affected files:
services/device/nfc/android/java/src/org/chromium/device/nfc/NfcProviderImpl.javacontent/browser/android/nfc_host.cc
Estimated timestamp from git blame: 2020-12-16
Root Cause Analysis
There is a logic flaw in how NFCHost::GetNFC manages the visibility-suspend state relative to NfcImpl construction, combined with the fact that NfcProviderImpl.java does not persist or track the suspended state. This results in two potential pathways that allow a hidden or background tab to run with fully unsuspended NFC operations.
Path A: Initial Bind Ordering Gap (Potential Web-reachable Route)
When a background tab requests the WebNFC interface for the first time while hidden:
-
NFCHost::GetNFCis called incontent/browser/android/nfc_host.cc(line 42). Becausenfc_provider_is not yet bound, the browser binds theNfcProviderpipe and immediately callsMaybeResumeOrSuspendOperations(web_contents()->GetVisibility()), which queues a Mojo call toSuspendNFCOperations()because the tab is hidden:C++ if (!nfc_provider_) { content::GetDeviceService().BindNFCProvider( nfc_provider_.BindNewPipeAndPassReceiver()); MaybeResumeOrSuspendOperations(web_contents()->GetVisibility()); } -
Immediately after, it queues the initialization call on the same FIFO pipe:
C++ nfc_provider_->GetNFCForHost(id, std::move(receiver)); -
Because both calls run on the same FIFO pipe,
SuspendNFCOperations()arrives first at the Java implementation (NfcProviderImpl.java). However, becausegetNfcForHosthas not yet run,mNfcImplisnull:Java public void suspendNfcOperations() { if (mNfcImpl != null) { mNfcImpl.suspendNfcOperations(); } }As a result, the suspension signal is silently ignored, and the suspended state is not saved.
-
Next,
getNfcForHost()is processed, which instantiates a newNfcImplobject. This new object defaults tomOperationsSuspended = false(inNfcImpl.javaconstructor at line 122). -
Since the tab is already hidden, no subsequent
OnVisibilityChangedevents fire, and the background tab'sNfcImplremains active and unsuspended indefinitely.
Path B: Rebind Wipes Suspended State (Potential Compromised Renderer Route)
- When a tab is visible, the connection is established and
mNfcImplis active. - When the tab becomes hidden,
OnVisibilityChangedfires, callingSuspendNFCOperations()and successfully settingmOperationsSuspended = trueinNfcImpl. - A compromised renderer can send a second
BrowserInterfaceBroker.GetInterface(device.mojom.NFC)request. - In
NFCHost::GetNFC, sincenfc_provider_is already initialized, the blockif (!nfc_provider_)is bypassed. Thus,MaybeResumeOrSuspendOperationsis NOT called. The browser proceeds to callnfc_provider_->GetNFCForHostwith a new receiver. - On the Java side,
NfcProviderImpl.getNfcForHost()destroys the existing correctly-suspendedmNfcImpland constructs a fresh one withmOperationsSuspended = false(without checking the current visibility of the host tab).
Potential Steps to Reproduce
Note: These are suggested/potential steps based on manual source code analysis; our tooling agent does not have the ability to run live code.
Path A:
-
On Chrome for Android, visit an attacker-controlled site and grant the NFC permission prompt.
-
Register a listener for the
visibilitychangeevent that initiates WebNFC scan/write requests after the document is hidden:JavaScript document.addEventListener('visibilitychange', () => { if (document.hidden && !started) { started = true; const r = new NDEFReader(); r.scan().then(() => r.onreading = e => { // Read NDEF payload and serial number }); r.write("pwned"); } }); -
Switch to a different tab or minimize the browser.
-
The background tab requests the WebNFC interface. Due to the ordering gap,
NfcProviderImplignores the suspension call, leaving NFC operations fully functional. -
When the user taps an NFC tag, the hidden background tab is able to read, write, or permanently lock the tag.
Suggested Fix
To resolve this issue, the suspension state should be persistent and tracked by the provider regardless of NfcImpl instantiation:
- Update
NfcProviderImpl.javato track the current suspension state via a boolean member variable (e.g.,private boolean mOperationsSuspended;). - Update this tracked state when
suspendNfcOperations()andresumeNfcOperations()are called, regardless of whethermNfcImplis currently null. - In
getNfcForHost(), initialize the newNfcImplinstance with the tracked state ofmOperationsSuspendedrather than hardcoding it tofalsein theNfcImplconstructor.
Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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 suspend call is queued on the same pipe before the NFC implementation object is created, so it is discarded when that object is null, and the suspended state is never stored for later use.
Impact
A hidden page with prior NFC permission could covertly read, write or permanently lock physical tags the user taps, though the report notes the steps are untested source-code analysis and the second path needs a compromised renderer.
What the attacker needed
Chrome for Android; NFC permission already granted; victim taps an NFC tag; hidden or background tab
The fix
The provider should track the suspended state itself and apply it when creating the NFC implementation, rather than defaulting to unsuspended.
How it was found
- Visit an attacker-controlled site on Chrome for Android and grant the NFC permission prompt.
- Register a visibilitychange listener that starts NFC scan and write requests once the document is hidden.
- Switch to another tab or minimise the browser.
- The hidden tab requests the WebNFC interface and the suspension call is ignored.
- When the user taps an NFC tag, the hidden tab reads, writes or locks it.
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.
WebNFC lets a web page talk to the phone's near-field chip, the radio used for tapping tags. Normally the browser pauses that access when the page is not visible, so a page you cannot see cannot touch your tags. Here the pause instruction arrives before the part that does the work has been created, so it is thrown away and the page keeps full access in the background.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.