
PowerShell-based Intune remediation package that detects and removes the vulnerable autofstx.exe BootExecute entry from offline WinRE images, then refreshes BitLocker trust to mitigate the CVE-2026-45585 YellowKey bypass.
Intune Remediation package for the CVE-2026-45585 YellowKey BitLocker/WinRE bypass mitigation described in the provided procedure.
This package removes autofstx.exe from the offline WinRE image's BootExecute value and refreshes WinRE registration so BitLocker trust is reestablished.
YellowKey-WinRE-Remediation/
scripts/
Detect-YellowKeyWinRE.ps1
Remediate-YellowKeyWinRE.ps1
.editorconfig
.gitattributes
.gitignore
README.md
Use these settings for the remediation package:
| Setting | Value |
|---|---|
| Detection script | scripts/Detect-YellowKeyWinRE.ps1 |
| Remediation script | scripts/Remediate-YellowKeyWinRE.ps1 |
| Run this script using the logged-on credentials | No |
| Enforce script signature check | No, unless you sign the scripts |
| Run script in 64-bit PowerShell | Yes |
Detection:
reagentc.exe /mountre.SYSTEM hive under a temporary HKLM name.ControlSet###\Control\Session Manager\BootExecute value for autofstx.exe.1 when autofstx.exe is found or detection cannot safely complete.0 when no vulnerable entry is found.Remediation:
reagentc.exe /mountre.SYSTEM hive.BootExecute entry containing autofstx.exe from every offline ControlSet.RegistryValueKind.MultiString when writing BootExecute.BootExecute; if filtering would empty it, writes the Windows default autocheck autochk *.reagentc.exe /unmountre /commit.reagentc.exe /disable and reagentc.exe /enable to refresh WinRE registration and BitLocker trust.The scripts are intentionally conservative:
BootExecute value.C:\ProgramData\IntuneRemediations\YellowKey.Detection log:
C:\ProgramData\IntuneRemediations\YellowKey\Detect.log
Remediation log:
C:\ProgramData\IntuneRemediations\YellowKey\Remediate.log
Run syntax validation without executing remediation:
$paths = @(
'.\scripts\Detect-YellowKeyWinRE.ps1',
'.\scripts\Remediate-YellowKeyWinRE.ps1'
)
foreach ($path in $paths) {
$tokens = $null
$errors = $null
[System.Management.Automation.Language.Parser]::ParseFile($path, [ref] $tokens, [ref] $errors) | Out-Null
if ($errors.Count -gt 0) {
$errors | Format-Table
throw "Parse failed: $path"
}
}
Run Script Analyzer if installed:
Invoke-ScriptAnalyzer -Path .\scripts -Recurse
reagentc.exe /info..ps1 files and enable signature enforcement.| Script | Exit 0 | Exit 1 |
|---|---|---|
| Detection | Compliant or WinRE disabled/not applicable | Vulnerable or detection could not safely complete |
| Remediation | Remediation completed successfully | Remediation failed or cleanup was required |