Skip to content
Race condition Advisory Advanced CVE-2026-79263

Race condition in Extensions (CVE-2026-79263)

A time-of-check to time-of-use flaw in Chrome's extension installer allows an attacker who controls a network share to swap a signed CRX file with a malicious archive between signature verification and file copying. This lets the attacker install a malicious extension that inherits the trusted identity of the legitimate extension.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 5 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: A potential Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in SandboxedUnpacker::StartWithCrx when installing extensions. An attacker can swap a legitimately signed CRX file with a malicious archive between signature verification and file copying, allowing them to bypass signature checks and spoof the extension's identity.

Affected files:

  • extensions/browser/sandboxed_unpacker.cc
  • chrome/browser/extensions/external_registry_loader_win.cc
  • extensions/browser/crx_installer.cc
  • chrome/browser/extensions/external_provider_manager.cc

Estimated timestamp from git blame: 2021-07-22

Summary

A potential Time-of-Check to Time-of-Use (TOCTOU) vulnerability in SandboxedUnpacker::StartWithCrx allows an attacker to bypass CRX signature verification. When Chrome loads an external extension from a network share (e.g., via a Windows registry policy pointing to a UNC path), an attacker who controls the network share can swap the file between the verification step and the copy step. This allows the installation of a malicious extension that inherits the trusted identity of the legitimate extension.

Technical Details

In extensions/browser/sandboxed_unpacker.cc, the StartWithCrx method performs signature validation and file copying in two distinct, sequential operations using the same file path:

C++
// 1. Time of Check: Validates signature and extracts public key.
if (!ValidateSignature(
        crx_info.path, expected_hash,
        format_verifier_override_.value_or(crx_info.required_format))) {
  return;
}

// ...

// 2. Time of Use: Re-opens the file by path to copy it locally.
base::FilePath temp_crx_path =
    temp_dir_.GetPath().Append(crx_info.path.BaseName());

if (!base::CopyFile(crx_info.path, temp_crx_path)) {
  // ...
}

ValidateSignature calls crx_file::Verify, which opens the file, validates the signature, extracts public_key_ and extension_id_, and then closes the file handle. Immediately after, base::CopyFile re-opens the file by its path.

Because the file handle is dropped between these operations, an attacker can serve a legitimate CRX file during the first read, and a malicious ZIP archive during the second read.

The impact is critical because SandboxedUnpacker::RewriteManifestFile forcibly injects the public_key_ (extracted during the legitimate verification step) into the attacker's parsed manifest:

C++
final_manifest.Set(manifest_keys::kPublicKey, public_key_);

Since Chrome derives the extension ID from this public key, the malicious extension flawlessly spoof's the legitimate extension's ID, passing subsequent CrxInstaller::CheckExpectations checks. Additionally, for off-store external extensions, Chrome's content verification typically runs in UNSIGNED_HASHES or NONE mode, allowing the malicious extension to run silently without a valid verified_contents.json signature.

Potential Attack Steps

Note: These are potential steps based on code analysis. Our tooling agent does not currently have the ability to run code to provide a working Proof of Concept.

  1. Configuration: A system administrator configures a Windows machine to install an extension via the registry, pointing to a network share (e.g., HKLM\Software\Google\Chrome\Extensions\<id>\path = \\attacker-server\share\ext.crx).
  2. Attacker Setup: The attacker configures their SMB server (\\attacker-server) to serve a legitimately signed CRX file upon the first file open request, and a malicious ZIP archive upon the second open request.
  3. Time of Check: Chrome attempts to install the extension. crx_file::Verify opens the file over SMB. The attacker's server delivers the legitimate CRX. Chrome extracts the trusted public key and closes the file handle.
  4. Payload Swap: The attacker's SMB server observes the Close request and immediately swaps the served payload to the malicious ZIP archive.
  5. Time of Use: Chrome calls base::CopyFile, re-opening the file over SMB. The attacker's server delivers the malicious ZIP archive, which Chrome copies to its local temporary directory.
  6. Identity Forgery: Chrome unzips the malicious archive, parses its manifest, and injects the trusted public key into it. The malicious extension is installed with the identity and privileges of the legitimate extension.

Suggested Fix

To eliminate the TOCTOU race condition, Chrome should never rely on the same file path for both validation and unpacking without holding an exclusive lock, especially for paths outside of Chrome's secure directories.

The CRX file should be copied to a secure, locally-owned temporary directory before any signature validation or unpacking takes place.

  1. Modify CrxInstaller or SandboxedUnpacker to first execute base::CopyFile (or equivalent) to move the source file into Chrome's temp_dir_.
  2. Update ValidateSignature to operate exclusively on the local, securely-copied temporary file rather than the original crx_info.path.

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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.

The original report as published on the Chromium issue tracker. 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

The code validates the signature and then re-opens the same file path to copy it, without holding a lock or using the same file handle, creating a race condition.

Impact

An attacker could install a malicious extension that spoofs the identity of a legitimate extension, potentially gaining its privileges, though the attack requires control of a network share and specific configuration.

What the attacker needed

Windows machine with registry-configured extension; Extension path points to attacker-controlled network share; Attacker controls SMB server

The fix

The CRX file should be copied to a secure local temporary directory before any signature validation or unpacking, and validation should operate on that local copy.

How it was found

  1. An administrator configures a Windows machine to install an extension from a network share via the registry.
  2. The attacker sets up an SMB server to serve a legitimate CRX file on the first open and a malicious ZIP on the second open.
  3. Chrome opens the file over SMB for signature verification and receives the legitimate CRX, extracting the trusted public key.
  4. The attacker's server detects the file close and swaps the payload to the malicious ZIP.
  5. Chrome re-opens the file to copy it, receiving the malicious ZIP, which is copied to a local temporary directory.
  6. Chrome unzips the malicious archive, injects the trusted public key into its manifest, and installs it with the legitimate extension's identity.

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 Chrome installs an extension from a network location, it first checks the file's signature and then copies the file. If an attacker can change the file between these two steps, Chrome ends up copying a malicious file while still trusting the signature it checked earlier. This lets the attacker make their malicious extension look like a trusted one.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.