Skip to content
Access control Write-up Intermediate

The Keychain CVE Where Every Key Fits

The macOS login keychain could be unlocked with any password, or no password, when the user had an active GUI session, and its password could be changed without knowing the real one. An attacker with local access could read all stored secrets or lock the user out of the keychain.

medium.com

Published on medium.com

Since macOS 26.4, there’s been an issue with the keychain hiding in plain sight and that issue is it’ll take ANY password. Say what?

Bob Gendler, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the new user authentication daemon (userauthd) treats an active GUI session as sufficient proof of identity, so the keychain unlock and password-change checks no longer verify the supplied password.

Impact

An attacker with local access, including over SSH while the user has an unlocked console session, could unlock the login keychain, read all stored secrets, or change its password and lock the user out; the GUI prompts still required the real password, and the unlock issue was fixed in macOS 26.6.

What the attacker needed

Local access to the Mac; user logged into a GUI session; macOS 26.4 to 26.5.2

The fix

Apple fixed the unlock issue in macOS 26.6, and the password-change command now requires the real old password.

How it was found

  1. Lock the login keychain.
  2. Confirm it is locked with the show-keychain-info command, cancelling the password prompt.
  3. Unlock the keychain and type any password, or just press return.
  4. Confirm the keychain is now unlocked with show-keychain-info again.

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 write-up has not been written yet. The Original tab links to the source.

The keychain is where macOS stores passwords and certificates, protected by a password. Normally you must know that password to unlock it. Here, if someone was already logged in at the screen, the command-line tool accepted any password at all, so a local attacker or a malicious app could open the keychain and read everything inside.

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.

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.