Windows & BSOD · critical

How to fix KERNEL_SECURITY_CHECK_FAILURE (0x139)

Windows & BSOD troubleshooting guide

What this error means

Windows stopped because the kernel found that one of its critical internal data structures had been corrupted. Windows checks these structures on purpose and stops rather than continue with damaged data. Something wrote where it should not: most often a driver that is outdated or incompatible with the current Windows version (a typical trigger is a major Windows upgrade), sometimes faulty RAM, damaged system files or low-level security or tuning software.

Updated

Applies to
Windows 11 and Windows 10
Difficulty
Intermediate
Before changes
Driver changes and memory tests restart the PC; Driver Verifier can cause repeated crashes until it is turned off

Reviewed by Matyáš Rada · Documentation checked: 2026-10-30 · Checked against Microsoft's bug check and Driver Verifier documentation; not tested on every configuration.

Before you begin

Back up important files and create a restore point. Photograph the blue screen, including any "What failed" file name. If Windows cannot start, see the startup guide.

Work through these checks

0 of 7 complete
01Check when the crashes started in Reliability Monitor

This stop code is usually caused by something that changed. Reliability Monitor shows crashes and installations on one timeline, so the change is easy to spot.

  1. Press Win + R, type perfmon /rel and press Enter.
  2. Find the first day with a red "Windows was not properly shut down" or BlueScreen event.
  3. Look at the information icons on that day and the days before: Windows updates, driver installs, new programs.
  4. Note any driver named on the blue screen next to "What failed".
What to expect

You have a likely culprit: an update, a driver or a program installed just before the crashes began.

If it does not help

Deal with that change first in steps 2 and 3. If nothing changed, continue in order.

Browse related errors
02Update or roll back drivers

Drivers written for an older Windows version are the classic cause after a major upgrade, while a newly installed driver is the classic cause otherwise.

  1. If a driver was named or installed just before the crashes, roll it back: Device Manager > right-click the device > Properties > Driver > Roll Back Driver.
  2. Otherwise download current graphics, chipset, network, Wi-Fi, audio and storage drivers from the PC or component makers, especially after upgrading Windows.
  3. Remove old drivers for devices you no longer use, such as old printers, VPN adapters or virtual drives.

Use drivers only from the manufacturers' websites or Windows Update.

What to expect

The crashes stop after the incompatible driver is replaced.

If it does not help

If a device has no driver for your Windows version, contact its maker or stop using it.

Browse related errors
03Remove low-level system software

Security suites, anti-cheat systems, VPNs, RGB and fan controllers, and overclocking tools load kernel drivers that can corrupt kernel data when they are out of date.

  1. In Settings > Apps > Installed apps, uninstall third-party antivirus, VPN, tuning and RGB software one program at a time, starting with the most recently installed.
  2. Use the vendor's removal tool for antivirus products if one exists.
  3. Microsoft Defender protects the PC automatically while third-party antivirus is removed.
What to expect

The crashes stop after a particular program is removed.

If it does not help

Reinstall the newest version of that program later, or replace it.

Browse related errors
04Return memory and CPU settings to default and test the RAM

Unstable memory can corrupt kernel data in ways that look exactly like a driver bug.

  1. In the BIOS, choose Load Optimized Defaults so XMP/EXPO and any overclock are off.
  2. Run Windows Memory Diagnostic (Win + R, mdsched.exe), or MemTest86 for at least four passes.
What to expect

The memory test passes and the crashes stop or continue at default settings.

If it does not help

If the test reports errors, follow the memory test errors guide on this site.

Browse related errors
05Repair system files and check the drive

Damaged Windows files or file system errors can make Windows load corrupted code.

  1. Open Terminal (Admin) and run DISM /Online /Cleanup-Image /RestoreHealth, then sfc /scannow.
  2. Run chkdsk C: /scan and, if it reports problems, chkdsk C: /f at the next restart.
What to expect

SFC and chkdsk find no remaining problems.

If it does not help

Restart and use the PC normally to see whether the crashes continue.

Browse related errors
06Use Driver Verifier to identify the driver

When no driver is named, Driver Verifier checks third-party drivers more strictly so the faulty one causes a crash that names it.

  1. Create a restore point and make sure you know how to reach Safe Mode.
  2. In Terminal (Admin), run verifier, choose Create standard settings and select only drivers not provided by Microsoft.
  3. Restart and use the PC until it crashes, then note the driver named on the blue screen.
  4. Turn Driver Verifier off with verifier /reset (from Safe Mode if needed) and restart.

Never leave Driver Verifier running. It is meant for diagnosis only.

What to expect

A crash names the faulty driver, which you then update or remove as in step 2.

If it does not help

If you prefer not to do this, give the files in C:\Windows\Minidump to the PC maker's support or a technician.

Browse related errors
07Repair-install or reset Windows

If the crashes continue with clean drivers and healthy memory, a fresh set of Windows files removes any remaining corruption.

  1. On Windows 11, try Settings > System > Recovery > Fix problems using Windows Update > Reinstall now, if available, or run Windows setup from Microsoft's installation media and keep files and apps.
  2. If that does not help, back up and use Reset this PC with Keep my files.

Reset this PC removes installed apps.

What to expect

Windows runs without the stop code.

If it does not help

If the crash returns on a clean installation before you install extra software, suspect hardware and contact the PC manufacturer.

Browse related errors

Possible causes

  • Driver incompatible with the current Windows version, often after a major upgrade
  • Outdated or faulty graphics, network, storage or audio driver
  • Antivirus, anti-cheat or system tuning software with kernel drivers
  • Faulty RAM or an unstable memory profile (XMP/EXPO)
  • Damaged Windows system files or file system errors

Useful Windows tools

These commands open Windows tools. Review changes before applying them.

devmgmt.msc
mdsched.exe
eventvwr.msc

Sources & further reading