Inappropriate implementation in Crypto (CVE-2026-17865)
The macOS key lookup for unexportable keys did not restrict its search to the data-protection keychain and did not verify the access group of returned items, so legacy login keychain EC keys could be returned. A compromised network process could then use such a key as an ECDSA signing oracle through the browser process, or crash the browser if the key used an unexpected curve.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 55 days
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 issue in FindUnexportableKeys on macOS may allow a compromised network process to access and use legacy login keychain EC private keys as a signing oracle. Because the query does not isolate the data-protection keychain or verify the access group of returned items, unauthorized legacy keys can be loaded and bound. If the loaded key does not use the expected curve parameters, this behavior can also trigger a browser-process crash.
Affected files:
crypto/apple/unexportable_key_apple.mm
Estimated timestamp from git blame: 2026-01-08
Description
A potential logic and key-confusion vulnerability exists in the macOS implementation of FindUnexportableKeys in crypto/apple/unexportable_key_apple.mm.
When locating unexportable keys via the Apple Keychain API, the search query built by FindUnexportableKeys does not restrict its scope to the modern data-protection keychain. Furthermore, it lacks a manual post-filter to verify the keychain access group of the returned items. Consequently, standard software-backed EC private keys residing in the user's legacy file-based login keychain can leak past the search filter and be returned to the caller.
Under specific conditions, an attacker who has compromised the sandboxed network process can leverage this behavior to obtain a browser-process ECDSA signing oracle over a victim's legacy keychain keys (such as imported client certificates), bypassing sandbox and keychain access boundaries.
Note: The following steps are potential/suggested exploitation vectors identified through static analysis. Our tooling currently lacks the ability to execute code or verify these steps dynamically on a running macOS system.
Code Analysis
1. Missing Data-Protection Scoping and Access-Group Post-Filter
In crypto/apple/unexportable_key_apple.mm:150-208, FindUnexportableKeys prepares the SecItemCopyMatching query:
NSMutableDictionary* query = [NSMutableDictionary dictionaryWithDictionary:@{
CFToNSPtrCast(kSecClass) : CFToNSPtrCast(kSecClassKey),
CFToNSPtrCast(kSecAttrKeyType) :
CFToNSPtrCast(kSecAttrKeyTypeECSECPrimeRandom),
CFToNSPtrCast(kSecAttrAccessGroup) : access_group,
CFToNSPtrCast(kSecMatchLimit) : CFToNSPtrCast(kSecMatchLimitAll),
CFToNSPtrCast(kSecReturnAttributes) : @YES,
CFToNSPtrCast(kSecReturnRef) : @YES,
}];
Two critical security controls are absent here:
kSecUseDataProtectionKeychainis not set: Without@YESfor this attribute, macOS searches both the modern data-protection keychain and the legacy file-based keychain.- No post-filtering on
kSecAttrAccessGroup: As documented in sibling code (device/fido/mac/credential_store.mm), the macOSkSecAttrAccessGroupquery filter does not reliably exclude legacy keychain items. Sibling code explicitly implements manual validation of the returnedkSecAttrAccessGroupattribute, but this validation is missing inFindUnexportableKeys.
2. Reachability and Tag-Splicing
When UnexportableKeyProviderApple::FromWrappedSigningKeySlowly is called via the network-process-exposed Mojo interface, it calls FindUnexportableKeys with an empty application_tag_prefix (matching any returned item).
If a legacy key matches the requested wrapped_key (SHA-1 public key hash), the lookup succeeds. Because the key does not possess the expected DBSC application tag, execution falls into the tag-splicing branch (crypto/apple/unexportable_key_apple.mm:517-534):
NSMutableDictionary* key_attributes = [NSMutableDictionary
dictionaryWithDictionary:CFToNSPtrCast(key_dicts.front().get())];
key_attributes[CFToNSPtrCast(kSecAttrApplicationTag)] =
objc_storage_->application_tag_;
...
if (OSStatus status = crypto::apple::KeychainV2::GetInstance().ItemAdd(
NSToCFPtrCast(key_attributes), nil);
status != errSecSuccess) { return nullptr; }
return std::make_unique<UnexportableSigningKeyApple>(
NSToCFPtrCast(key_attributes));
This clones the attributes (retaining the raw SecKeyRef in kSecValueRef), stamps the expected DBSC application tag, and registers it. Since the tag is stamped on the wrapped key object, the subsequent invariant check CHECK(wrapped_key_and_tag == GetWrappedKeyAndTag(*key)) in unexportable_key_service_impl.cc:462 is successfully bypassed.
Potential Attack Scenario
- Preconditions: The victim has an EC P-256 private key in their legacy login keychain that Chrome is permitted to use without prompting (e.g., an mTLS client cert imported via Chrome). The attacker achieves RCE in the sandboxed network process.
- Key Targeting: The network process obtains the victim's public key (e.g., from an active TLS session) and computes its SHA-1 hash to serve as the
wrapped_keyidentifier. - Mojo Request: The network process calls
FromWrappedSigningKey(wrapped_key)over the Mojo pipe. - Key Splicing: The browser process executes the lookup, matches the legacy key, stamps the DBSC tag, registers the association, and returns a valid
key_idto the network process. - Signing Oracle: The network process calls
Sign(key_id, arbitrary_data)to generate arbitrary ECDSA signatures using the legacy private key via the browser process.
Note: If the retrieved legacy key is an EC key but does not use the P-256 curve (e.g., P-384), the SPKI generation inside UnexportableSigningKeyApple's constructor will dereference an empty std::optional returned by FromEcP256Point, resulting in a browser-process crash (Denial of Service).
Suggested Fix
Update FindUnexportableKeys in crypto/apple/unexportable_key_apple.mm to implement the same mitigations used by its sibling components:
- Explicitly restrict the search query to the Data Protection keychain by adding
kSecUseDataProtectionKeychain: @YESto the query dictionary. - Add a defensive manual post-filter to verify that the
kSecAttrAccessGroupattribute of any returned item matches the requestedaccess_groupbefore allowing it to be used.
Evaluated with Chrome root at commit: e9507a33bb4148ee071aaaf8a7e9ad68770359bf
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 keychain query omitted the data-protection keychain flag and lacked a manual check of the returned item's access group, so legacy keys passed the filter.
Impact
A compromised network process could obtain signatures from legacy keychain keys, crossing sandbox and keychain boundaries, and a non-P-256 key could crash the browser process; the text notes the steps are from static analysis and were not executed.
What the attacker needed
Victim has a legacy login keychain EC key; Chrome may use that key without prompting; attacker has code execution in network process
The fix
The lookup should be restricted to the data-protection keychain and should manually verify the access group of returned items before use.
How it was found
- The victim has an EC private key in the legacy login keychain that Chrome may use without prompting.
- The attacker gains code execution in the sandboxed network process.
- The network process computes the SHA-1 hash of the victim's public key as the wrapped key identifier.
- The network process requests the key over the Mojo interface.
- The browser process matches the legacy key, stamps the expected tag and returns a key identifier.
- The network process asks the browser process to sign arbitrary data with that key.
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.
macOS keeps passwords and keys in a keychain, and newer systems have a separate, more protected keychain for certain keys. This code asked for keys without saying which keychain to use, so older, less protected keys could be handed back. If an attacker already controlled one part of the browser, they could ask the more privileged part to sign data with those keys.
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.