Kernel Security Check Failure: Blue Screen Fix
In this article
A "Kernel Security Check Failure" blue screen (stop code 0x139) means Windows detected that a core system component, usually a driver, corrupted memory or violated a security rule. The fastest fix is to restart, then run the built-in Windows Memory Diagnostic and update or roll back the most recently installed driver. If the crash repeats, use Safe Mode to isolate the culprit. This guide walks through the safe, official steps in order, from simplest to most invasive. No special tools are needed beyond the Windows installation you already have.
What You'll Need
- A Windows 10 or Windows 11 PC that can boot, at least into Safe Mode.
- Administrator access to the account.
- An internet connection for driver and Windows updates.
- A blank USB drive (8 GB or larger) only if you later need to create recovery media; not required for the first steps.
Step-by-Step
- Restart and note the stop code. If the blue screen appears again, write down the stop code shown (it should read 0x00000139 or KERNEL_SECURITY_CHECK_FAILURE). This confirms you are treating the right error and not a different bug check.
- Boot into Safe Mode. From the sign-in screen, hold Shift while clicking Power > Restart. On the blue recovery screen choose Troubleshoot > Advanced options > Startup Settings > Restart, then press 4 or F4 for Safe Mode. If Windows starts normally, skip to step 4. Menu labels can differ slightly by Windows version, device and region.
- Run Windows Memory Diagnostic. In the search box type Windows Memory Diagnostic and open it. Choose "Restart now and check for problems." The test runs before Windows loads and takes 15–30 minutes. If it reports errors, a RAM stick is failing and should be reseated or replaced before anything else.
- Update Windows and drivers. Go to Settings > Windows Update > Check for updates and install everything offered, including optional updates. Then open Device Manager (right-click Start > Device Manager), expand Display adapters, Network adapters and System devices, right-click each entry and choose Update driver > Search automatically for drivers. Repeat for any device showing a yellow warning triangle.
- Roll back a recently updated driver. In Device Manager, right-click the suspect device (usually the graphics card or a network adapter), choose Properties > Driver tab. If "Roll Back Driver" is available, click it and follow the prompts. This is the correct move when the crashes began right after a driver update.
- Run the System File Checker and DISM. Open Command Prompt as administrator (search cmd, right-click, Run as administrator). Type
sfc /scannowand press Enter; let it finish. Then typeDISM /Online /Cleanup-Image /RestoreHealthand press Enter. Both repair corrupted Windows system files that can trigger the bug check. - Check for disk errors. In the same administrator Command Prompt, type
chkdsk C: /fand press Enter. If prompted to schedule the check at the next restart, type Y and restart. A failing drive or bad sectors can corrupt the kernel and cause this stop code. - Uninstall recent software or updates. Go to Settings > Apps > Installed apps and remove anything installed just before the crashes started, especially antivirus utilities, VPN clients and hardware monitoring tools. For a bad Windows update, open Settings > Windows Update > Update history > Uninstall updates and remove the most recent one.
- Disable fast startup and check power settings. Open Control Panel > Hardware and Sound > Power Options > Choose what the power buttons do > Change settings that are currently unavailable, then clear "Turn on fast startup." Restart normally and see whether the blue screen returns.
- Use System Restore if the problem persists. Search for Create a restore point, open System Restore and choose a restore point from before the crashes began. This reverts system files and drivers but leaves personal documents intact. It does remove apps and updates installed after that point, so note what you will need to reinstall.
- Last resort: reset Windows. Go to Settings > System > Recovery > Reset this PC. Choose "Keep my files" to preserve documents; apps and settings will be removed. Back up important data to an external drive first, because a reset can still fail if the disk itself is failing.
Common Mistakes
- Ignoring the memory test. Many people jump straight to reinstalling Windows when a failing RAM stick is the real cause. Run the memory diagnostic first; it is free and rules out the most common hardware culprit.
- Updating every driver at once. Bulk driver updaters can install mismatched or unsigned drivers. Update one device at a time so you know which change fixed or caused the problem.
- Using third-party "registry cleaners." These tools rarely help and can damage system files. Stick to SFC, DISM and official vendor drivers.
- Skipping Safe Mode. Trying to fix drivers from a normal boot can trigger another crash mid-change. Safe Mode loads a minimal driver set and lets you work without interruption.
- Resetting before backing up. A reset or reinstall can wipe data. Copy important files to an external drive or cloud storage first.
Tips
- Keep a note of the exact stop code and the time of each crash; it helps identify a pattern tied to a specific app or driver.
- Prefer drivers from the PC or motherboard manufacturer's support page over generic ones, especially for laptops.
- If the PC will not boot at all, use Windows Recovery Environment (hold Shift while clicking Restart) to reach Safe Mode and the repair tools.
- Check that your RAM sticks are fully seated and, if you have more than one, test them one at a time to find the faulty module.
- Keep Windows and your antivirus updated; security software that hooks deep into the kernel is a frequent source of this stop code when outdated.
Troubleshooting
If the blue screen returns immediately after a fix, boot back into Safe Mode and undo the last change. If Windows Memory Diagnostic reports errors, do not continue with software fixes; reseat or replace the RAM first. If SFC reports it cannot repair files, run DISM again and then repeat SFC. If the PC will not reach Safe Mode, use the Windows Recovery Environment's Startup Repair option, and if that fails, create installation media on another PC to access repair tools. When crashes happen only under load (games or heavy apps), suspect the graphics driver or overheating: update the GPU driver from the manufacturer's site and check that fans and vents are clear. If none of this stops the crash and the memory test is clean, a failing drive or motherboard is possible; back up your data and have the hardware checked.
Frequently Asked Questions
What causes a Kernel Security Check Failure blue screen?
It is usually caused by a faulty or incompatible driver, corrupted system files, failing RAM or a disk error. Less often, malware or a bad Windows update is responsible.
Can I fix it without reinstalling Windows?
Yes. Most cases are resolved by updating or rolling back a driver, running SFC and DISM, or replacing faulty RAM. A reinstall or reset is a last resort.
Does this error mean my PC is hacked?
No. It is a stability error, not a security breach. Run a full scan with your antivirus if you want reassurance, but the cause is almost always a driver or hardware issue.
Will System Restore delete my files?
No. System Restore reverts system files, drivers and installed programs to an earlier point but leaves personal documents, photos and other files untouched.
How long does Windows Memory Diagnostic take?
Typically 15 to 30 minutes depending on the amount of RAM and the test type. The standard test is enough to catch most faults.
What if the blue screen appears during Windows startup?
Use the Windows Recovery Environment: hold Shift while clicking Restart at the sign-in screen, then choose Troubleshoot > Advanced options to reach Safe Mode, Startup Repair or System Restore.