Medium chrome Logic Error 📄 Reporter bug report 🔧 Commit mapped

Overview

Medium
Severity
CVSS
No
Exploited ITW
Fixed
Fix Status
ImpactInappropriate implementation in Passwords
DescriptionInappropriate implementation in Passwords
ComponentPasswords
Bug ClassLogic Error
Tracker508273690
Fix commit6b2a28a760b1 (chromium/src) +15/-7
CISA KEVNot listed
CreditedGoogle
Disclosed2026-06-30

Changed Functions

FunctionChangeNotes
if
chrome/browser/password_manager/password_manager_util_mac.mm
modified

Files Changed

  • chrome/browser/password_manager/password_manager_util_mac.mm
From 6b2a28a760b1ce11d9836c60b2eb3bb033de0dd5 Mon Sep 17 00:00:00 2001
From: Viktor Semeniuk <vsemeniuk@google.com>
Date: Fri, 08 May 2026 00:23:39 -0700
Subject: [PATCH] Fix macOS password manager auth bypass by verifying right policy

Fixed: 508273690
Change-Id: I85f571548fa0e289e9cdf1b38f762652169fbeda
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7817383
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Viktor Semeniuk <vsemeniuk@google.com>
Cr-Commit-Position: refs/heads/main@{#1627501}
---

diff --git a/chrome/browser/password_manager/password_manager_util_mac.mm b/chrome/browser/password_manager/password_manager_util_mac.mm
index f62d344d..d212d1a1 100644
--- a/chrome/browser/password_manager/password_manager_util_mac.mm
+++ b/chrome/browser/password_manager/password_manager_util_mac.mm
@@ -29,14 +29,22 @@
 }
 
 bool EnsureAuthorizationRightExists() {
-  NSString* rightName = UserAuthenticationRightName();
-  // If the authorization right already exists there is nothing to do.
-  if (AuthorizationRightGet(rightName.UTF8String, nullptr) ==
-      errAuthorizationSuccess) {
-    return true;
+  NSString* right_name = UserAuthenticationRightName();
+  // If the authorization right already exists and is valid, there is nothing to
+  // do.
+  base::apple::ScopedCFTypeRef<CFDictionaryRef> right_definition;
+  if (AuthorizationRightGet(right_name.UTF8String,
+                            right_definition.InitializeInto()) ==
+          errAuthorizationSuccess &&
+      right_definition) {
+    CFStringRef rule = base::apple::GetValueFromDictionary<CFStringRef>(
+        right_definition.get(), CFSTR("rule"));
+    if (CFEqual(rule, CFSTR(kAuthorizationRuleAuthenticateAsSessionUser))) {
+      return true;
+    }
   }
 
-  // The authorization right does not exist so create it.
+  // The authorization right does not exist or is invalid, so create it.
   base::mac::ScopedAuthorizationRef authorization =
       base::mac::CreateAuthorization();
   if (!authorization) {
@@ -46,7 +54,7 @@
   // Create a right which requires that the user authenticate as the session
   // owner. The prompt must be specified each time the right is requested.
   OSStatus status =
-      AuthorizationRightSet(authorization, rightName.UTF8String,
+      AuthorizationRightSet(authorization, right_name.UTF8String,
                             CFSTR(kAuthorizationRuleAuthenticateAsSessionUser),
                             nullptr, nullptr, nullptr);
   if (status != errAuthorizationSuccess) {
Loading diff…

Original Bug Report

reported by li...@chromium.org

Potential local auth bypass in macOS Password Manager via Auth Right poisoning

Flapjack, 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A logic flaw in Chrome’s macOS password manager potentially allows local malware to bypass the system password prompt. By pre-creating a custom authorization right with a permissive policy, an attacker can cause Chrome’s authentication checks to succeed silently. This could enable programmatic extraction of saved credentials without user interaction.

Affected files:

  • chrome/browser/password_manager/password_manager_util_mac.mm

Estimated timestamp from git blame: Unknown (Google3 checkout)

Summary

The function password_manager_util_mac::EnsureAuthorizationRightExists() in chrome/browser/password_manager/password_manager_util_mac.mm contains a logic flaw that checks for the existence of an authorization right without verifying its security policy. This allows local, unprivileged malware to pre-create the right with a permissive rule (e.g., allow), causing subsequent authentication prompts to be silently bypassed by macOS.

Technical Details

Chrome uses macOS Authorization Services to protect sensitive actions like viewing or exporting saved passwords. It defines a custom right (e.g., com.google.Chrome.access-passwords) that requires the user to authenticate as the session owner.

In EnsureAuthorizationRightExists(), Chrome checks if this right exists:

bool EnsureAuthorizationRightExists() {
  NSString* rightName = UserAuthenticationRightName();
  // If the authorization right already exists there is nothing to do.
  if (AuthorizationRightGet(rightName.UTF8String, nullptr) ==
      errAuthorizationSuccess) {
    return true;
  }
  // ... code to create the right with kAuthorizationRuleAuthenticateAsSessionUser ...
}

The flaw lies in passing nullptr as the second argument to AuthorizationRightGet. This argument is meant to retrieve the right’s definition dictionary. Because Chrome passes nullptr, it only verifies that the right exists, but completely fails to verify that the right enforces the secure kAuthorizationRuleAuthenticateAsSessionUser policy.

According to macOS Authorization Services, any unprivileged application in the user session can create a new authorization right if it does not already exist. An attacker can create this exact right but assign it the rule kAuthorizationRuleAllow.

Potential Exploitation Steps

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

  1. Precondition: The user has not yet viewed or exported passwords in Chrome on this machine, meaning the system authorization right (e.g., com.google.Chrome.access-passwords) has not yet been initialized in the macOS authorization database.
  2. Right Poisoning: Local malware executes under the user’s unprivileged account and calls AuthorizationRightSet, targeting Chrome’s specific right name. The malware specifies the rule kAuthorizationRuleAllow.
  3. Automating Chrome: The malware copies the user’s Chrome profile and launches a headless instance of Chrome using --remote-debugging-port to programmatically extract passwords.
  4. Bypassing Biometrics: The malware ensures Chrome is launched in an environment where biometrics fail (e.g., a detached session or background daemon where [LAContext canEvaluatePolicy:] returns false), forcing Chrome to fall back to the system password prompt (AuthenticateUserWithNonBiometrics).
  5. Triggering the Bypass: Chrome attempts to authorize the password export. EnsureAuthorizationRightExists() returns true immediately because the right exists (ignoring the poisoned rule).
  6. Silent Extraction: Chrome calls AuthorizationCopyRights. macOS evaluates the right, sees the attacker’s allow rule, and immediately grants authorization without showing a UI prompt. Chrome decrypts and exports the passwords silently.

Suggested Fix

Instead of blindly trusting the right if it exists, Chrome should verify the rule dictionary to ensure it matches expectations.

bool EnsureAuthorizationRightExists() {
  NSString* rightName = UserAuthenticationRightName();
  CFDictionaryRef rightDefinition = nullptr;
  
  if (AuthorizationRightGet(rightName.UTF8String, &rightDefinition) == errAuthorizationSuccess) {
    // Verify the dictionary contains the correct rule (kAuthorizationRuleAuthenticateAsSessionUser)
    // If it does, return true. If not, proceed to recreate/overwrite the right.
  }
  // ...
}

Alternatively, Chrome could attempt to blindly overwrite the right with the correct secure rule on startup, or at minimum enforce the rule verification whenever AuthorizationRightGet succeeds.

Evaluated with Chrome root at commit: cc901875d53bf4e4fe0e01f02843871da4106e70


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.

View on issue tracker