FixIntermediateTutorials

How to Protect Windows from the YellowKey BitLocker Bypass (CVE-2026-45585)

Apply Microsoft's official mitigations for the YellowKey zero-day (CVE-2026-45585) by editing the WinRE image and enabling BitLocker TPM+PIN to block the BitLocker bypass.

Emanuel De Almeida May 22, 2026 17 min read
Difficulty
Intermediate
Time
20-30 minutes
Steps
8

YellowKey (CVE-2026-45585) is a security-feature-bypass flaw in Windows that lets an attacker with physical access defeat BitLocker encryption. The attack works by placing modified FsTx files on a USB drive or the EFI partition, rebooting into the Windows Recovery Environment (WinRE), and holding CTRL to open an elevated command prompt. It carries a CVSS score of 6.8, kept relatively low because exploitation requires hands-on access to the target machine — though a working exploit is already public on GitHub.

Microsoft has not yet shipped a fix (the next opportunity is the June 2026 Patch Tuesday, June 9), so it published an interim mitigation you must apply manually per machine. The core of that mitigation is editing the WinRE image to stop the vulnerable component from running: mount the image, load its SYSTEM hive, remove the autofstx.exe entry from the BootExecute value, then commit the change and reset BitLocker trust for WinRE. This guide walks through each step, covers the automated batch-script alternative, and explains the optional TPM+PIN hardening that blocks the attack outright — at the cost of a PIN prompt at every boot.

Because you are editing the WinRE registry and touching BitLocker trust, a mistake can break the recovery boot or trigger a recovery-key prompt. Record your BitLocker recovery keys and note the current WinRE state before you begin.

Before you start

What you will learn

  • You will learn how to mitigate the YellowKey BitLocker bypass (CVE-2026-45585) by removing the vulnerable autofstx.exe entry from the WinRE image, and optionally how to enforce BitLocker TPM+PIN to block the attack regardless of WinRE state.
  • A public proof-of-concept exploit is already available on GitHub, and an attacker with physical access to an affected machine can bypass BitLocker to reach an elevated command prompt. With no official patch yet released, applying the manual mitigation is the only way to protect sensitive endpoints in the meantime.

Requirements

  • You need local administrator rights on each target machine and must run every command from an elevated Command Prompt (Run as administrator). This is a per-device manual procedure; there is no console for applying it fleet-wide except by deploying the batch script.
  • Local Administrator on the target Windows device

Good to know

  • About 10-20 minutes per machine; mounting and unmounting the WinRE image can take several minutes each.
  • Guidance and commands are based on Microsoft's mitigation for affected builds: Windows 11 24H2/25H2/26H1 (x64) and Windows Server 2025, including Server Core. Windows 10 is not affected.

Quick answer

Mitigate YellowKey by editing the WinRE image to remove the vulnerable autofstx.exe entry from the BootExecute registry value, then re-establish BitLocker trust. There is no patch yet, so this manual fix (or enforcing BitLocker TPM+PIN) is the recommended protection until Microsoft ships an update.

Code
reagentc /mountre /path C:\mount

Step-by-step tutorial

8 steps
1

Understand the YellowKey vulnerability and check your exposure

Confirm whether the machine is actually affected before making any changes.

Start > Run > winver

YellowKey (CVE-2026-45585, CVSS 6.8) is a BitLocker security-feature bypass. An attacker with physical access places modified FsTx files on a USB drive or the EFI partition, reboots into the Windows Recovery Environment (WinRE), and holds CTRL to open an elevated command prompt — bypassing BitLocker.

Before mitigating, confirm all of the following:

1. The machine runs an affected build: - Windows 11 version 24H2 (x64) - Windows 11 version 25H2 (x64) - Windows 11 version 26H1 (x64) - Windows Server 2025 (including Server Core) 2. BitLocker is enabled on the OS drive.

Check the OS build with winver or the command below, and confirm BitLocker status.

Cmd
winver
manage-bde -status C:
Expected resultwinver shows an affected Windows 11 24H2/25H2/26H1 or Server 2025 build, and manage-bde reports the C: drive as "Protection On".

Windows 10 is not affected — no action is required there. If BitLocker is off or the build is not listed above, the YellowKey mitigation in this guide does not apply. The CVSS score is relatively low precisely because physical access is required.

2

Back up your BitLocker recovery keys and record the WinRE state

Avoid a lockout or an unbootable recovery environment if the edit goes wrong.

You are about to modify the WinRE image and its registry. A mistake can break recovery boot or trigger a BitLocker recovery prompt, so prepare a safety net first.

  1. Record your BitLocker recovery key and store it somewhere safe and off the machine (Microsoft account, Azure AD/Entra device record, printout, or your key-escrow system).
  2. Note the current WinRE state by running reagentc /info and recording the "Windows RE status" and "Windows RE location".

Keep the recovery key accessible during the whole procedure.

Cmd
manage-bde -protectors -get C:
reagentc /info
Expected resultmanage-bde displays the 48-digit recovery key (or its ID for escrow), and reagentc /info reports "Windows RE status: Enabled" with a valid Windows RE location.

This tutorial modifies a live system (isReadOnly: false) and requires a backup of your recovery keys. If reagentc /info shows WinRE as Disabled, resolve that before continuing — the mount step will fail without an enabled WinRE.

3

Mount the WinRE image for editing

Expose the recovery image so its files and registry can be modified.

Start > type cmd > Run as administrator

Open an elevated Command Prompt (right-click Command Prompt > Run as administrator).

Create a mount folder, then load the WinRE image into it:

Cmd
mkdir C:\mount
reagentc /mountre /path C:\mount
Expected resultreagentc reports "REAGENTC.EXE: Operation Successful." and C:\mount is populated with the WinRE image contents (Windows, sources, etc.).

Mounting the WinRE partition can take a while. You must run this from an elevated prompt — a standard prompt will fail. If the mount fails, re-check reagentc /info from the previous step.

4

Load the WinRE system registry hive

Make the recovery image's SYSTEM registry editable from the running OS.

Load the WinRE image's SYSTEM hive under a temporary key (HKLM\WinREHive) so you can edit its values without affecting your live system registry:

Cmd
reg load HKLM\WinREHive C:\mount\Windows\System32\config\SYSTEM
Expected resultreg reports "The operation completed successfully." and HKLM\WinREHive becomes available in the registry.

WinREHive is just a temporary mount name — you will unload it later. Do not close the Command Prompt or reboot while the hive is loaded, or you may leave the WinRE image in an inconsistent state.

5

Remove autofstx.exe from the BootExecute value

Disable automatic execution of the vulnerable YellowKey component in WinRE.

regedit > HKLM\WinREHive\ControlSet001\Control\Session Manager > BootExecute

Open Registry Editor (regedit) and navigate to:

HKLM\WinREHive\ControlSet001\Control\Session Manager

Double-click the BootExecute value (type REG_MULTI_SZ) and remove the `autofstx.exe` entry (its own line). Leave any other lines intact, then click OK.

If BootExecute contains only autofstx.exe, remove that single entry so the value becomes empty.

Cmd
reg query "HKLM\WinREHive\ControlSet001\Control\Session Manager" /v BootExecute
Expected resultAfter editing, the BootExecute REG_MULTI_SZ no longer lists autofstx.exe; the reg query output shows the remaining entries only (or an empty value).

BootExecute is a multi-string value — edit it carefully so you delete only the autofstx.exe line and preserve the others (such as the default autocheck autochk *). The reg query command is a read-only way to confirm the current contents before and after your edit.

6

Unload the hive, commit the image, and re-establish BitLocker trust

Persist the change and restore WinRE integrity so BitLocker trusts the recovery image.

Run the following in order from the elevated Command Prompt:

  1. Unload the temporary hive.
  2. Unmount and commit the modified WinRE image.
  3. Disable then re-enable WinRE to reset its BitLocker trust.
Cmd
reg unload HKLM\WinREHive
reagentc /unmountre /path C:\mount /commit
reagentc /disable
reagentc /enable
Expected resultEach reg/reagentc command reports success ("Operation Successful"), and WinRE is re-registered with your edited image applied.

The /commit flag is essential — without it your registry edit is discarded. reagentc /disable followed by reagentc /enable re-seals WinRE so BitLocker trusts it again.

Automated alternative: security researcher Jernej Simončič published a Batch script that performs all of these steps (mount, edit BootExecute, unmount with /commit, and reset WinRE trust). It self-elevates and edits the multi-string value programmatically — useful for rolling out across many endpoints.

7

Optional: enforce BitLocker TPM+PIN

Add a startup PIN that blocks the attack regardless of the WinRE state.

Computer Configuration > Administrative Templates > Windows Components > BitLocker Drive Encryption > Operating System Drives > Require additional authentication at startup

As recommended by researcher Will Dormann, switching BitLocker from TPM-only to TPM+PIN requires a PIN at every boot, which blocks the YellowKey bypass.

  • Group Policy: Configure Require additional authentication at startup under Computer Configuration > Administrative Templates > Windows Components > BitLocker Drive Encryption > Operating System Drives, allowing/requiring a startup PIN.
  • Intune: Configure the BitLocker startup authentication settings in a disk-encryption/endpoint-security policy to require a PIN with the TPM.

Apply the policy, then set the PIN on the endpoint.

Cmd
manage-bde -protectors -add C: -TPMAndPIN
Expected resultBitLocker prompts for a PIN at every startup, and manage-bde -status / -protectors shows a TPM+PIN key protector on the OS drive.

This is a standalone mitigation — with TPM+PIN, an attacker cannot silently reach WinRE to run the bypass. The trade-off is daily inconvenience: users must type the PIN at each boot. For new machines, set TPM+PIN via Group Policy or Intune before encryption. This step is optional; the WinRE edit already mitigates the flaw.

8

Verify the fix

Confirm the mitigation is in place and WinRE still boots.

Confirm the mitigation held:

  1. Run reagentc /info and check that Windows RE status is still Enabled.
  2. Re-mount and inspect BootExecute to confirm autofstx.exe is gone. Mount the image, load the hive, and query the value, then unload/unmount without committing (no /commit needed for a read-only check).
Cmd
reagentc /info
reagentc /mountre /path C:\mount
reg load HKLM\WinREHive C:\mount\Windows\System32\config\SYSTEM
reg query "HKLM\WinREHive\ControlSet001\Control\Session Manager" /v BootExecute
reg unload HKLM\WinREHive
reagentc /unmountre /path C:\mount /commit
Expected resultreagentc /info shows "Windows RE status: Enabled", and the BootExecute query no longer lists autofstx.exe.

Microsoft has not confirmed a release date for the official fix; the next opportunity is the June 2026 Patch Tuesday (Tuesday, June 9). Keep this manual mitigation in place until a verified patch is installed, and re-check BootExecute after any WinRE-related update, since servicing can reset the recovery image.

Verify the YellowKey Mitigation Is Applied

After you commit the WinRE change and re-establish BitLocker trust, confirm that the recovery environment is still healthy and that the vulnerable autofstx.exe entry is gone. Two checks matter here: the WinRE state and the BootExecute value inside the recovery image.

First, re-run reagentc /info from an elevated Command Prompt. The output must show that Windows RE is enabled, with a valid Windows RE location. If WinRE reports as disabled or the location is blank, the reagentc /disable / reagentc /enable cycle did not complete correctly, and BitLocker trust for the recovery image was not re-established — do not leave the machine in this state.

Second, confirm that autofstx.exe is no longer scheduled to run at WinRE boot. Because the image is unmounted after the fix, you cannot read the live value directly; the reliable confirmation is that Step 5 completed with /commit and Step 6 re-enabled WinRE without error. If you want to re-inspect, re-mount the image (reagentc /mountre), reload the hive, and run reg query "HKLM\WinREHive\ControlSet001\Control\Session Manager" /v BootExecute — the returned REG_MULTI_SZ data must not contain autofstx.exe.

Success does not mean the CVE is patched — it means the attack path through WinRE is closed on this machine. The official fix is expected no earlier than the June 2026 Patch Tuesday (June 9, 2026); apply it when released and re-verify afterward.

  • reagentc /info reports Windows RE status as Enabled with a valid Windows RE location. When the image is re-mounted and the hive reloaded, the BootExecute value under Session Manager contains only its default entries (such as the autochk task) and no autofstx.exe. If you enforced TPM+PIN, the machine prompts for a PIN at every startup.
  • reagentc /info shows Windows RE as Disabled or with an empty location; the machine fails to reach the recovery environment; or BootExecute still lists autofstx.exe. Any of these means the mitigation is incomplete or WinRE is broken — restore from your saved WinRE/backup state, keep your BitLocker recovery key on hand, and repeat the procedure.
  • Run after Step 6. Status must read Enabled with a non-empty location, confirming BitLocker trust for WinRE was re-established.
  • Queried after re-mounting the image and reloading the hive. The autofstx.exe entry is absent; only the default autochk task remains.
  • Indicates the disable/enable cycle failed. WinRE recovery boot may not work; re-run the fix and verify you can still unlock with your recovery key.

Troubleshooting

reagentc /mountre fails or reports that WinRE is disabled

Cause: The WinRE image is disabled, missing, or its partition is not present, so there is nothing to mount.

Run reagentc /info first to check the Windows RE status. If it shows Disabled, run reagentc /enable (as administrator) to re-register the image, then retry reagentc /mountre /path C:\mount. Confirm the recovery partition still exists before editing anything.

autofstx.exe is not found in the BootExecute value

Cause: On some configurations the entry may already be absent, or you are inspecting the wrong control set / hive.

Confirm you loaded the hive from C:\mount\Windows\System32\config\SYSTEM and are looking under HKLM\WinREHive\ControlSet001\Control\Session Manager. If autofstx.exe genuinely is not present, no edit is needed — leave the REGMULTISZ value unchanged and continue to unload the hive.

The registry hive will not unload (reg unload fails with access denied)

Cause: A process such as regedit, a command window, or an antivirus scanner still has a handle open on the loaded WinREHive key.

Close any open Registry Editor windows and command prompts that touched the hive, then retry reg unload HKLM\WinREHive. If it still fails, the mount cannot be committed cleanly; do not force-unmount — resolve the open handle first to avoid corrupting the WinRE image.

BitLocker prompts for the recovery key at the next boot after editing WinRE

Cause: Changing the WinRE image alters the measured boot chain, and BitLocker trust was not reset, so the TPM no longer releases the key automatically.

Run reagentc /disable followed by reagentc /enable to reset WinRE BitLocker trust as shown in Step 6. If you are already at the recovery screen, enter the recovery key you stored in Step 2, then complete the disable/enable cycle from Windows.

The commit step (reagentc /unmountre /commit) takes a very long time or appears to hang

Cause: Committing changes back into the WinRE image is a disk-intensive operation and can be slow on some hardware, as the automated script itself warns.

Allow the command to complete without interrupting it — the batch script explicitly notes 'this can take a while, too'. Do not close the window or reboot mid-commit, which could leave the WinRE image in an inconsistent state.

Frequently asked questions

Which Windows versions are affected by the YellowKey vulnerability (CVE-2026-45585)?

The affected systems are Windows 11 version 24H2 (x64), 25H2 (x64), and 26H1 (x64), plus Windows Server 2025 including the Core installation. Windows 10 is not affected by this BitLocker bypass.

Can the YellowKey attack be exploited remotely or only with physical access?

The attack requires physical access to the target machine. An attacker must place modified FsTx files on a USB drive or the EFI partition, plug it in, reboot into the Windows Recovery Environment (WinRE), and hold CTRL to open an elevated command prompt.

Does enabling BitLocker with a PIN stop the YellowKey bypass?

Yes. Switching from TPM-only to TPM+PIN mode requires a PIN at every startup and blocks the YellowKey attack, because the key is no longer released automatically. The trade-off is that users must enter the PIN on each boot.

Will Microsoft release an official patch for CVE-2026-45585?

Microsoft has not confirmed a release date for the fix. The next likely opportunity is the June 2026 Patch Tuesday, scheduled for Tuesday, June 9, 2026. Until then, the WinRE mitigation or TPM+PIN is the recommended protection.

Do I need my BitLocker recovery key before editing the WinRE image?

Yes, record and safely store your BitLocker recovery key before you begin. Editing the WinRE registry changes the boot chain and can trigger a recovery-key prompt, so having the key on hand prevents lockout.

Is Windows 10 vulnerable to the YellowKey BitLocker bypass?

No, Windows 10 is not affected by CVE-2026-45585. The vulnerability affects Windows 11 (24H2, 25H2, 26H1 x64) and Windows Server 2025 only.

Read next

Reader reviews

Rate this articleBe the first to rate
No written reviews yetRate the article above, or be the first to share your experience.

Related articles