Skip to content
Access control Advisory Advanced CVE-2026-106198

Missing authorization in FileSystem (CVE-2026-106198)

The browser-side file picker code accepted a renderer-supplied directory token without checking that the token's origin matched the calling origin. A compromised renderer could therefore open the picker pre-positioned at another origin's private directory path and, on a user click, obtain a file handle over that other origin's directory.

pakhunov.anton.n Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 5 months

Report description

FileSystemAccessManagerImpl::ChooseEntries Permissions Bypass: missing origin check on start_in.directory_token (incomplete-fix sibling of 3b8f2da9fa)


Bug location

Where do you want to report your vulnerability?

Chrome VRP – Report security issues affecting the Chrome browser. See program rules

Which URL (or repository) have you found the vulnerability in?

https://source.chromium.org/chromium/chromium/src/+/main:content/browser/file_system_access/file_system_access_manager_impl.cc;l=637


The problem

Please describe the technical details of the vulnerability

Vulnerability Description

FileSystemAccessManagerImpl::ChooseEntries (the browser-side implementation of showOpenFilePicker / showSaveFilePicker / showDirectoryPicker) accepts a renderer-supplied options->start_in_options->directory_token and resolves it through ResolveTransferToken into ResolveDefaultDirectory, which calls HandleTransferTokenAsDefaultDirectory(token, info) to extract the token's URL as the default directory of the system file picker. The resolved token's origin() is never compared against the calling context's storage_key.origin().

content/browser/file_system_access/file_system_access_manager_impl.cc:613-624:

C++
if (!options->start_in_options.is_null() &&
    options->start_in_options->is_directory_token() &&
    options->start_in_options->get_directory_token().is_valid()) {
  auto token = std::move(options->start_in_options->get_directory_token());
  options->start_in_options->set_directory_token(mojo::NullRemote());
  ResolveTransferToken(
      std::move(token),
      base::BindOnce(&FileSystemAccessManagerImpl::ResolveDefaultDirectory,
                     weak_factory_.GetWeakPtr(), context, std::move(options),
                     std::move(wrapped_callback)));
  return;
}

content/browser/file_system_access/file_system_access_manager_impl.cc:637-687 (ResolveDefaultDirectory):

C++
PathInfo path_info;
if (resolved_directory_token) {
  // Prioritize an explicitly stated directory handle to start in over an `id`
  // or a well-known directory.
  HandleTransferTokenAsDefaultDirectory(resolved_directory_token, path_info);
}

content/browser/file_system_access/file_system_access_manager_impl.cc:333-356 (HandleTransferTokenAsDefaultDirectory):

C++
void HandleTransferTokenAsDefaultDirectory(
    FileSystemAccessTransferTokenImpl* token,
    PathInfo& info) {
  // ...
  DCHECK(token_url_type == storage::kFileSystemTypeLocal);
  info.path = token->type() == HandleType::kFile ? token->url().path().DirName()
                                                 : token->url().path();
}

The path lifted from the cross-origin token becomes the picker's default directory, the picker is shown to the user pre-positioned at that directory, and (if the user clicks any file inside) the resulting FileSystemFileHandle is constructed with the calling context (origin B) rather than the token's owning origin (origin A).

This is a missed sibling of:

  • 3b8f2da9fa - "FSA: Check destination directory origin in DidResolveTokenToMove" (2026-04-27)
  • crbug.com/499917177 - DidResolveTokenToObserve origin check (referenced in 3b8f2da9fa commit message)

The 3b8f2da9fa commit message itself is explicit:

"Sibling callbacks in FileSystemAccessManagerImpl that resolve destination tokens (DidResolveTransferTokenForFileHandle and DidResolveTransferTokenForDirectoryHandle) already enforce this via IsValidTransferToken; DidResolveTokenToMove was missed."

ResolveDefaultDirectory / HandleTransferTokenAsDefaultDirectory is the next missed sibling.

The threat model is documented in-tree at manager_impl.cc:1442 (DidResolveTransferTokenForFileHandle):

"In practice, the FileSystemAccessManager should not receive any invalid tokens. Before redeeming a token, the render process performs an origin check to ensure the token is valid. Invalid tokens indicate a code bug or a compromised render process."

A compromised renderer of origin B that has obtained a FileSystemAccessTransferToken registered to a different origin A (e.g. via cross-origin postMessage of a FileSystemDirectoryHandle, which is permitted by the FSA spec; the token pipe survives in the receiving SerializedScriptValue's tokens array) can send a ChooseEntries Mojo message whose start_in_options.directory_token references A's token.

Attack Preconditions

  • Compromised renderer at origin B.
  • Origin B's renderer has reached a FileSystemAccessTransferToken Mojo pipe registered to a different origin A. The legitimate way for B to reach such a pipe is cross-origin postMessage of a FileSystemHandle, which is allowed by spec; only the browser-side IsValidTransferToken (in the file-handle / directory-handle redemption paths) and the Blink deserializer's GetDirectoryHandleFromToken round-trip currently quarantine cross-origin tokens.
  • Origin A previously had a directory grant (e.g. /Users/<user>/Documents/SecretCorp/) - the path that becomes the picker's default.
  • Standard user activation that authorizes any normal showOpenFilePicker from origin B.

No additional sandbox escape, no user activation chain beyond the picker's normal trigger, no privileged extension.

Reproduction Steps

A unit test that drives the bug at the Mojo layer is provided as fsa_chooseentries_origin_bypass_poc.patch. The test mirrors the in-tree MoveRefusesCrossOriginDestinationToken browsertest pattern:

  1. Construct a FileSystemAccessDirectoryHandleImpl for https://victim.example.org over a real on-disk directory and call manager_->CreateTransferToken(...) to register the token in transfer_tokens_.
  2. Pin SetFilePickerResultForTesting to a file inside that victim directory.
  3. Issue manager_remote_->ChooseEntries(options{start_in.directory_token = victim_token}) from the fixture's bound remote, which is bound to https://example.com/test.

Expected (with fix applied): the call returns kInvalidArgument and an empty entries vector. Without the fix: ResolveTransferToken returns the victim's TransferTokenImpl*, HandleTransferTokenAsDefaultDirectory writes the victim path into path_info, and the call eventually returns kOk plus a FileSystemAccessEntry for victim_dir/loot to the attacker's bound remote (and would, in production, have rendered the victim's path in the system picker dialog).

Build:

gn gen out/asan --args='is_asan=true is_debug=false symbol_level=1 is_component_build=true enable_nacl=false'
autoninja -C out/asan content_unittests

Run:

out/asan/content_unittests \
    --gtest_filter=FileSystemAccessManagerImplTest.ChooseEntries_RefusesCrossOriginStartInToken

Real stdout/stderr captured via shell redirect: fsa_chooseentries_origin_bypass_test_output.txt.

Impact analysis

A compromised renderer at origin B with a TransferToken registered to a different origin A can:

  1. Cross-origin path disclosure: cause the system file picker to open at A's previously-private absolute path (/Users/<user>/...), rendering that path on the user's screen, into accessibility/screen-share/screenshot pipelines, and into any reporter that captures dialog state. The full ancestor path is not normally web-exposed - FileSystemHandle.name only reveals the basename.
  2. Cross-origin read grant on one user click: if the user clicks any file inside the pre-positioned directory, DidChooseEntries runs with B's binding_context and constructs a FileSystemFileHandle for B over a file inside A's directory. The user's click is interpreted as authorizing the picker (which is what the user expected), not as authorizing B to access A's filesystem grant.

Severity classification:

  • Vulnerability type: Permissions Bypass (primary), with Information Leak as the click-free fallback.
  • Process: browser process.
  • Mitigations: none in place. The Blink-side ToMojomStartInOptions same-origin check is bypassed by a compromised renderer that crafts the Mojo message directly; the browser must enforce.

The cause

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

150.0.7831.0 (HEAD, commit 0fb7a10ddc, 2026-05-07) Stable at the time of writing: 148.0.7778.97 - also affected (bug is pre-existing, not a regression).

Is the security issue related to a crash?

No, it is not related to a crash.

Choose the type of vulnerability

Permissions Bypass

The original report as published on the Chromium issue tracker, by pakhunov.anton.n. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 ChooseEntries path resolved a renderer-supplied transfer token into a default directory without validating the token's origin against the calling context, unlike sibling callbacks that use IsValidTransferToken.

Impact

A compromised renderer could disclose another origin's private absolute path in the picker dialog and, if the user clicked a file there, obtain a file handle over that origin's directory; no mitigations were in place.

What the attacker needed

Compromised renderer at origin B; cross-origin handle token via postMessage; victim origin had a directory grant; user clicks a file in the picker

The fix

The browser should reject a start-in directory token whose origin does not match the calling context, returning an invalid-argument error.

How it was found

  1. Register a transfer token for a victim origin over a real on-disk directory.
  2. Pin the test file picker result to a file inside that victim directory.
  3. Send a ChooseEntries message from a different origin's remote using the victim token as the start-in directory token.
  4. Observe the call returning success with an entry for the victim file instead of being rejected.

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 website asks the user to pick a file, the browser shows a dialog. This code let a malicious page tell the browser to start that dialog inside a folder belonging to a different site, revealing the folder's full path and, if the user clicked a file, handing that file to the wrong site. The check that the folder really belongs to the asking site was simply missing.

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.

More by pakhunov.anton.n

View all

1 more disclosed report, 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.

Broken access control

The lesson behind this report.

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.