SERVER SECURITY GUIDE

Server Patch Management: Why Unpatched Servers Get Hacked

Unpatched servers get hacked because a working fix for the vulnerability already exists publicly, and attackers only need to find servers that have not installed it yet. According to the Verizon 2026 Data Breach Investigations Report, vulnerability exploitation became the single most common initial access vector in breaches, accounting for 31% of incidents analyzed, up from 20% the year before. A disciplined patch management process, not just occasional manual updates, is what closes that gap.

Quick win (10 minutes)

  • Check how far behind your server is right now: apt list --upgradable (Debian/Ubuntu) or dnf check-update (RHEL family).
  • Install unattended-upgrades if it is not already present: sudo apt install unattended-upgrades.
  • Confirm it is actually enabled: cat /etc/apt/apt.conf.d/20auto-upgrades should show both settings set to "1".
  • Check when the server last rebooted with uptime, since a long uptime on a kernel-patched system usually means pending fixes are not yet active.
  • Set a recurring calendar reminder for a weekly patch review, even if updates are automated, so nothing silently stalls.

Why unpatched servers get hacked

Servers get hacked through unpatched software because the vulnerability and often a working exploit are publicly documented the moment a patch ships, turning every unpatched server into a known, searchable target rather than one an attacker has to discover from scratch. Once a CVE and its fix are public, the vulnerability details, and frequently proof-of-concept exploit code, become available to anyone, including automated scanning tools that continuously sweep the internet for servers still running the vulnerable version.

This is not a hypothetical risk. The Verizon 2026 Data Breach Investigations Report, which analyzed more than 22,000 confirmed breaches across 145 countries, found that vulnerability exploitation overtook both phishing (16% of breaches) and credential abuse (13%) to become the leading initial access vector, a 55% year-over-year increase. That shift reflects how much easier it has become for attackers to scan for and exploit known, unpatched vulnerabilities at scale compared to running a phishing campaign against a specific target.

CISA's Known Exploited Vulnerabilities (KEV) catalog exists precisely because of this pattern: it tracks vulnerabilities confirmed to be under active exploitation and assigns a remediation due date, and while the binding deadline in CISA's directive formally applies to federal agencies, the agency explicitly recommends every organization treat KEV-listed vulnerabilities as top remediation priorities regardless of sector. For a concrete, current example of that pattern in action, see our writeup of CISA's September 2026 KEV additions, one of which was used to plant reverse shells and cryptocurrency miners on unpatched hosts.

N-day exploits: why speed matters more than perfection

An n-day exploit targets a vulnerability for which a patch already exists, where n counts the days since disclosure, and the entire premise of the attack is that the target has not applied that patch yet. Unlike a zero-day, there is no novel technique involved; the defense already exists, it just has not been deployed.

The window attackers have to work with keeps shrinking. According to Google Mandiant's time-to-exploit research, the average time between vulnerability disclosure and observed active exploitation fell to roughly five days based on Mandiant's 2023 analysis of 138 exploited vulnerabilities, down from 32 days in the 2021 to 2022 period and 63 days back in 2018 to 2019. Twelve percent of the n-days Mandiant studied were exploited within a single day of disclosure, 29% within a week, and 56% within a month. Mandiant's more recent M-Trends 2026 reporting describes this compression continuing, with exploitation increasingly clustering right around, and in some tracked cases before, public disclosure.

That trend has a direct operational consequence: a patch cadence of "we get to it during the next maintenance cycle" measured in weeks or months is no longer adequate for high-severity, internet-facing vulnerabilities. Speed of remediation for critical issues now matters as much as thoroughness of testing, which is why the strategy below separates routine patching from an expedited path for anything flagged as actively exploited.

Building a patch management strategy

A working patch management strategy has four parts: an inventory of what is running, a defined and mostly automated process for routine updates, a faster expedited path for critical or actively exploited vulnerabilities, and a way to verify patches actually took effect. NIST Special Publication 800-40 Revision 4, Guide to Enterprise Patch Management Planning, frames this explicitly as preventive maintenance requiring an organization-wide strategy rather than ad hoc, reactive patching.

In practice, for a small or mid-sized business running Linux VPS infrastructure, this breaks down into a small number of concrete decisions:

  • Know what needs patching. Track OS packages, the kernel, and any application runtimes or language dependencies separately, since they are usually patched through different mechanisms and on different cadences.
  • Automate the routine work. Security-scoped OS package updates are low-risk and high-volume; automating them (covered below) removes the single biggest source of patch drift, which is simply forgetting.
  • Define an expedited path. When a vulnerability lands on CISA's KEV catalog or a vendor issues a critical advisory for software you run, that patch should not wait for the next scheduled window.
  • Set a review cadence. CIS Controls v8's Control 7 recommends performing OS patching through automated patch management monthly or more frequently, and reviewing the remediation process itself at least every 30 days, which is a reasonable baseline even outside a formal CIS compliance context.

For the broader set of controls this strategy sits inside, see our full VPS security checklist, which covers patching alongside firewalling, access control, and monitoring as parts of one coherent hardening program rather than isolated tasks.

Automating updates with unattended-upgrades

On Debian and Ubuntu, unattended-upgrades automatically installs security updates on a schedule without requiring manual intervention, and it is installed by default on most current Ubuntu Server images. The two files that control it are /etc/apt/apt.conf.d/20auto-upgrades, which turns the mechanism on, and /etc/apt/apt.conf.d/50unattended-upgrades, which controls what gets installed and how.

# /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

Inside 50unattended-upgrades, the default configuration typically restricts automatic installation to the distribution's security repository, which is the safest default since security updates are narrowly scoped fixes rather than feature or behavior changes. According to Ubuntu's own Server documentation, administrators can also configure automatic reboots when a patch requires one:

# /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "03:30";
Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
Unattended-Upgrade::MailReport "on-change";

Ubuntu's documentation notes that Automatic-Reboot-WithUsers defaults to true, meaning the system will reboot at the scheduled time even if users are logged in, which is worth being deliberate about on a shared or interactive server. Setting Automatic-Reboot-Time to a genuinely low-traffic hour and MailReport to on-change (so you only get an email when something actually happened) keeps the automation quiet in normal operation and visible when it matters. Every unattended-upgrades run is logged to /var/log/unattended-upgrades/unattended-upgrades.log, which is the first place to check if you suspect an update silently failed.

On RHEL-family distributions, the equivalent mechanism is dnf-automatic, configured through /etc/dnf/automatic.conf, with a similar split between checking for updates, downloading them, and applying them, and its own systemd timer controlling the schedule.

Don't know how far behind your patches actually are?

A free, read-only server check reviews your patch status and configuration without making any changes.

Get your free server check Talk to a security engineer

Patch windows and change control

A patch window is a defined, recurring block of time set aside for applying updates and rebooting if required, scheduled during low traffic and communicated in advance so nobody is surprised by a brief outage. Even with automation handling the mechanical work of installing packages, a human-defined window matters because reboots and certain package upgrades can briefly disrupt service.

A workable pattern for a small business running a handful of VPS instances is a weekly maintenance window for routine, automated security patching, plus a separate expedited process triggered specifically by a critical advisory or a KEV catalog addition affecting software you run. The expedited path should not wait for the weekly window; NIST SP 800-40 Rev. 4 explicitly frames prioritization by risk, not a fixed calendar, as central to sound patch management planning.

Change control does not need to be heavyweight for a small environment, but it should cover three things at minimum: what is being patched and why, when the window is happening, and what the rollback plan is if something breaks. Keeping a simple log of patch windows, even a shared document noting date, packages updated, and outcome, pays off the first time you need to figure out when a regression was introduced.

Testing patches before wide rollout

Security-only OS patches are low risk enough that most organizations apply them automatically without a separate test cycle, but patches touching your application runtime, database engine, or any service with custom configuration deserve a staging pass first when a staging environment exists. The risk profile is different: a kernel security patch is narrowly scoped and heavily tested upstream before release, while an application-level or major version update can change behavior in ways that only surface under your specific configuration and workload.

For a single small VPS without a dedicated staging tier, a reasonable substitute is staggering rollout (patch a lower-priority server first if you have more than one) and actively watching logs, error rates, and basic service health for the hour or two after a patch window rather than assuming success. This is also where having patch windows during known low-traffic periods pays off: if something does break, you find out and can respond while impact is still limited.

Keep a rollback path available regardless of how much testing you do. Package manager history (apt, dpkg, or dnf all retain records of previous versions), filesystem or VPS snapshots taken immediately before a patch window, and recent backups are the three practical ways to undo a patch that causes an unexpected regression. Our server monitoring and log analysis guide covers setting up the visibility needed to catch a bad patch quickly rather than days later.

Kernel live patching

Kernel live patching applies security fixes directly to a running kernel without requiring a reboot, closing the gap between when a kernel vulnerability is fixed upstream and when that fix is actually active in memory on your server. Traditional kernel patching installs the new kernel package but leaves the old, vulnerable kernel running in memory until the next reboot, which on servers that are rarely rebooted can leave a critical fix installed but inactive for weeks or months.

Canonical Livepatch is the live patching service for Ubuntu, and according to Canonical's own Livepatch documentation, it specifically targets kernel vulnerabilities rated high or critical CVSS severity with security implications such as privilege escalation or remote code execution, applying them in-memory to running systems. Canonical's documentation notes that every livepatch goes through the same testing rigor as a standard Ubuntu kernel package, tested cumulatively with previously applied patches on real hardware rather than emulation, before being made available.

Live patching is not a replacement for eventually rebooting into the latest full kernel package, since not every kernel change can be applied live (some require an actual reboot), but it materially shrinks the exposure window for the specific class of severe vulnerabilities it covers. It matters most for servers where scheduled downtime is hard to arrange, or where the realistic gap between a kernel patch release and your next planned reboot would otherwise stretch into weeks.

Verifying patches actually applied

Automation reduces the effort of patching but does not guarantee it worked, so verification, checking that updates actually installed and that a required reboot actually happened, is a distinct step that deserves its own checklist item. A patch job that silently failed due to a locked package, a disk space issue, or a broken repository mirror looks identical to a successful one unless someone checks.

  • Review /var/log/unattended-upgrades/unattended-upgrades.log (or the dnf-automatic equivalent) for errors on a recurring basis, not just when something seems wrong.
  • Check uptime against your patch window history: a server with an uptime longer than your patch cycle plus live patching coverage has likely missed a required reboot for a non-live-patchable kernel update.
  • On Debian/Ubuntu, cat /var/run/reboot-required tells you directly whether a pending update is waiting on a restart to take effect.
  • Periodically confirm package versions installed match what the security advisory or changelog says should be present, especially after any patch window that reported an error.

If patch management is being handled as part of a broader managed security relationship rather than entirely in-house, verification is one of the areas where that arrangement should show its value: confirmation that patches applied, not just that a job ran. Our managed security vs. DIY comparison covers where that division of responsibility tends to make sense for small and mid-sized teams and where handling it in-house remains practical.

This month: CISA KEV, October 2026 lists the newest actively exploited vulnerabilities that matter to Linux server owners; see CISA KEV catalog and CVSS for how to read them.

Frequently asked questions

What is an n-day exploit?

An n-day exploit targets a vulnerability that already has a public patch available, where n is the number of days since disclosure. Unlike a zero-day, the fix already exists; the only reason an n-day attack succeeds is that the target server has not yet installed it.

How quickly do attackers exploit newly disclosed vulnerabilities?

According to Google Mandiant's time-to-exploit research, the average time between vulnerability disclosure and active exploitation fell to about five days in Mandiant's 2023 dataset, down from 32 days in 2021 to 2022 and 63 days in 2018 to 2019. Mandiant's 2026 M-Trends report describes this window continuing to compress.

Is automatic patching safe for a production server?

Automatic installation of security updates is broadly considered safe and is the default recommendation from Ubuntu and Debian's own documentation, since security-only updates are narrowly scoped bug fixes rather than feature changes. Automatic reboots and non-security package updates carry more risk and are usually better handled with a scheduled window and prior testing.

What is a patch window and how do I set one?

A patch window is a defined, recurring block of time set aside for applying updates and rebooting if required, chosen during a period of low traffic and communicated in advance. Weekly windows for routine updates plus an expedited out-of-band process for critical vulnerabilities cover most small business needs.

What is kernel live patching and do I need it?

Kernel live patching applies security fixes to a running kernel without a reboot, closing the gap between when a kernel fix is released and when it is actually active on the server. It matters most for servers where scheduled downtime is difficult to arrange.

Should I test patches before applying them to production?

Security-only patches are low risk and are commonly applied automatically without a separate test cycle, but any patch touching your application runtime, database engine, or a service with custom configuration is worth testing on staging first when one is available.

How often should CIS Controls guidance say I patch?

CIS Controls v8 Control 7 recommends performing operating system patching through automated patch management on a monthly basis or more frequently, and reviewing the remediation process itself at least every 30 days.

What happens if a patch breaks something?

Keep a rollback path: package manager history, snapshots, or backups taken before a patch window, so a broken update can be reverted quickly. This is why patch windows during low-traffic periods with someone available to respond matter.

Can I outsource patch management entirely?

Yes, managed security providers can handle patch monitoring, testing, scheduled application, and verification as part of an ongoing service, removing the operational burden from an internal team without dedicated security staff.

Not sure where your server stands?

Get a free, read-only security check, or talk to a security engineer about managed protection.

Get your free server check Talk to a security engineer