PSM Outage, Reboot Loops, and Disappearing Sessions after Microsoft Update KB5122876
Symptom
Customers may experience the following combination of symptoms following a recent Windows update cycle:
- Disappearing Sessions: Users launching a session from the PVWA see the RDP window pop up and immediately close. No error is displayed to the user.
- Missing Logs: No new logs (e.g.,
PSMConsole.log,PSMTrace.log) are generated during the connection attempt. - AppLocker Blocks: The Windows Event Viewer (
Applications and Services Logs>Microsoft>Windows>AppLocker>EXE and DLL) displays Event ID 8004 indicating that core Windows files such asmscorlib.dll,cbsapi.dll, andctfmon.exewere prevented from running. - RDS Deadlocks: Native RDP connections to the PSM server (even to
127.0.0.1locally) timeout. Attempting to restart the Remote Desktop Services (TermService) service hangs in a "Stopping" state (Error 1053) and leaves ghost processes. - Server Instability: The server may enter a continuous reboot loop as the OS attempts to recover from the service deadlock and blocked UI components.
Environment
14.6 Privileged Access Manager (PAM, self-hosted) PSM
PSM Connection via PVWA
Privileged Access Manager (PAM, self-hosted)
Privileged Session Manager (PSM)
Windows Server (with Microsoft patch KB5122876 applied)
Cause
Microsoft update KB5122876 introduces two distinct conflicts with the PSM environment:
- TermService Deadlock Bug: The patch contains a defect that causes the Windows Remote Desktop Service to hang permanently in memory when processing connections or recovering from timeouts. This prevents the server from listening for RDP traffic and severely destabilizes the OS.
- AppLocker Hash Mismatches: The update replaces multiple core Windows system files. Because PSM's default AppLocker configuration enforces a strict "default deny" policy based on specific file hashes, the newly updated Microsoft files are no longer recognized and are actively blocked. This prevents the
PSMInitSession.exeshell from loading, which causes the session to instantly crash before PSM can write to its logs.
Resolution
To fully resolve this issue, the server's OS must be stabilized and the PSM AppLocker rules must be re-baselined to trust the new system files.
Step 1: Stabilize the OS (Address the Deadlock)
- If the server is in a reboot loop, boot into Safe Mode or disconnect the virtual network adapter to halt the loop.
- Address the underlying Microsoft bug using one of the following methods:
- Option A (Recommended): Uninstall KB5122876 and reboot the server.
- Option B: Apply the Out-of-Band (OOB) fix provided directly by Microsoft Support for this specific KB, then reboot.
3. If TermService is currently hung, open an Administrator command prompt and run sc queryex termservice to find the PID, then terminate it using taskkill /F /PID <PID>. Start the Remote Desktop Services service.
Step 2: Re-baseline AppLocker Rules (Critical) Note: If you applied the Microsoft OOB fix (Option B), the hashes of the system files have changed again. You MUST perform this step, or sessions will continue to fail.
- Log onto the PSM server locally (via hypervisor console or native RDP if restored).
- Ensure the Application Identity service is running.
- Open PowerShell as an Administrator.
- Navigate to the PSM Hardening directory (Default:
C:\Program Files (x86)\CyberArk\PSM\Hardening). - Execute the AppLocker script:
.\PSMConfigureAppLocker.ps1 - Wait for the script to output "Successfully configured AppLocker." (You may also run
gpupdate /forceto ensure policies apply immediately). - Attempt a test connection via the PVWA to confirm normal operations.