Incorrect reference resolution in Extensions (CVE-2026-87613)
An unvalidated extension ID from Chrome Sync is used as a filesystem path component, allowing path traversal. An attacker could create or overwrite LevelDB files outside the intended directory, potentially injecting data into other extensions' storage.
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. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the Chrome Security team.
Overview: An unvalidated extension_id provided via Chrome Sync is used as a filesystem path component. By providing a malicious ID containing traversal segments, an attacker can cause the browser to create or overwrite LevelDB files outside the intended storage directory, potentially injecting data into other extensions.
Affected files:
chrome/browser/extensions/api/storage/setting_sync_data.ccchrome/browser/extensions/api/storage/sync_storage_backend.ccextensions/browser/api/storage/value_store_util.cccomponents/value_store/value_store_factory_impl.cccomponents/value_store/lazy_leveldb.cccomponents/sync/model/syncable_service_based_bridge.ccchrome/browser/extensions/api/storage/syncable_settings_storage.cc
Estimated timestamp from git blame: 2022-11-18
Summary
The Chrome Extension Settings Sync implementation contains a potential path traversal vulnerability. An unvalidated extension_id provided by the Sync server is used to construct the directory path for LevelDB storage. By providing a malicious extension_id containing path traversal segments (e.g., ../../), an attacker can cause the browser process to create or open LevelDB files at arbitrary locations relative to the user's profile directory. This can be leveraged to inject malicious data into the local storage of other installed extensions.
Technical Details
When the browser receives synchronized settings data (for the EXTENSION_SETTINGS or APP_SETTINGS data types), the sequence of events is as follows:
- Sync Update Received: The
SyncableServiceBasedBridgereceives the sync entities. ItsIsEntityDataValidmethod unconditionally returnstruefor these data types, relying on the underlyingSyncableServicefor validation. - Unvalidated Extraction:
SyncStorageBackend::ProcessSyncChangesiterates through the changes and createsSettingSyncDataobjects. InSettingSyncData::ExtractSyncData(chrome/browser/extensions/api/storage/setting_sync_data.cc:61), theextension_idis extracted directly from the protobuf:extension_id_ = extension_specifics.extension_id();. Crucially, this ID is never validated usingcrx_file::id_util::IdIsValid(). - Path Construction:
SyncStorageBackendcallsGetOrCreateStorageWithSyncData, passing this unvalidatedextension_id. This calls down tovalue_store_util::GetValueStoreDir(extensions/browser/api/storage/value_store_util.cc:41), which appends the ID to a base directory usingbase::FilePath::AppendASCII(id). - Traversal Permitted:
base::FilePath::AppendASCIIdoes not sanitize or reject..segments unless the string starts with an absolute path separator. Thus, a payload like../../Local Extension Settings/<target_extension_id>is successfully appended. - Database Opening: The traversed path is passed to
LazyLevelDb::EnsureDbIsOpen, which eventually calls OS-level APIs (vialeveldb_env::OpenDBandbase::CreateDirectoryAndGetError). The OS resolves the traversal components, causing LevelDB to open or create files at the targeted location. - Data Injection: Once opened, the sync logic writes the attacker-controlled JSON payload into the targeted LevelDB database.
Note: While active extension databases are protected by same-process file locks, an attacker can target the storage of inactive extensions or create arbitrary LevelDB files in other writable locations.
Potential Reproduction Steps
Please note: These are theoretical steps as our tooling agent cannot execute code to verify the exploit.
- From an attacker-controlled sync client (signed into the victim's account), commit an
EXTENSION_SETTINGSentity with a maliciousextension_idcontaining traversal segments, e.g.,../../Local Extension Settings/<target_extension_id>. Include a payload of key/value pairs to inject. - The victim's browser receives the sync update.
- The browser extracts the ID without validation and constructs a traversed file path.
- The browser opens the target extension's LevelDB database (if inactive) or creates new LevelDB files at the location.
- The attacker-controlled payload is written into the targeted LevelDB database.
Suggested Fix
Add validation to SettingSyncData::ExtractSyncData in chrome/browser/extensions/api/storage/setting_sync_data.cc. Before assigning extension_id_, verify it using crx_file::id_util::IdIsValid(extension_specifics.extension_id()). If the ID is invalid, the sync data should be rejected and ignored, similar to how it is handled in ExtensionSyncData::PopulateFromExtensionSpecifics.
Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b
Results 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.
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 extension ID from sync data is not validated before being appended to a filesystem path, allowing path traversal.
Impact
An attacker could inject data into the local storage of other installed extensions, though active extension databases are protected by file locks and the exploit is theoretical.
What the attacker needed
Attacker-controlled sync client; victim signed into same sync account; target extension inactive or writable location
The fix
The extension ID should be validated using crx_file::id_util::IdIsValid before use, and invalid sync data should be rejected.
How it was found
- From an attacker-controlled sync client signed into the victim's account, commit an EXTENSION_SETTINGS entity with a malicious extension_id containing traversal segments and a payload.
- The victim's browser receives the sync update.
- The browser extracts the ID without validation and constructs a traversed file path.
- The browser opens the target extension's LevelDB database (if inactive) or creates new LevelDB files at the location.
- The attacker-controlled payload is written into the targeted LevelDB database.
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.
Chrome Sync lets you share browser settings across devices. The browser trusts the extension ID sent by the sync server and uses it to build a folder path without checking it. By putting '..' in the ID, an attacker can make the browser write files in other folders, like another extension's data store.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.