When a critical CVE drops, you have a narrow window to patch before exploit code goes public. In hosting environments with dozens or hundreds of servers, a 24-hour target sounds impossible. It's not. The difference between teams that hit that window and teams that take a week is process, not luck.
I've walked through this drill enough times to know the bottlenecks. They're always the same: unclear ownership, no test plan, fear of breaking production. This runbook addresses all three.
Step 1: Triage and Scope the CVE (0-2 Hours)
You hear about a new CVE from a vendor mailing list, a security feed, or a panicked Slack message. First action is to read the advisory and answer three questions.
Does it affect your stack?
Check the affected software and version ranges against your inventory. If you run CentOS 7 and the CVE targets Ubuntu kernel 5.15+, you're clear. If you run Apache 2.4.50 and the advisory calls out 2.4.49-2.4.50, you're in scope.
Most teams don't have perfect inventory. You need a living manifest of every server's OS, kernel version, installed packages, and patch date. Tools like Ansible facts, Puppet reports, or even a cron job that writes rpm -qa output to a central log can give you this. Without it, you're flying blind.
What's the actual risk?
Not every "critical" CVE is equally urgent. A remote code execution vulnerability with a public PoC and active scanning is top priority. A local privilege escalation that requires an authenticated shell session can wait a few hours if you have strong access controls.
Look at the CVSS score, but don't stop there. Check whether exploit code is available, whether the vulnerability is being exploited in the wild, and whether your architecture exposes the vulnerable component. A critical OpenSSL bug matters less if your load balancer terminates TLS before traffic reaches your application servers.
Who owns the response?
Assign a single person to drive the patch from triage to deployment. That person doesn't do all the work, but they track progress, make go/no-go calls, and keep stakeholders updated. Without clear ownership, patches stall in committee.
By the end of hour two, you should have a list of in-scope servers, a risk rating, and a named owner. Document this in a shared channel or ticket so everyone's working from the same facts.
Step 2: Stage and Test the Patch (2-8 Hours)
Never deploy a security patch straight to production, no matter how urgent the CVE. Five minutes of testing can save you six hours of rollback.
Pull the patch into a staging environment
Most distributions ship security updates through their standard package repositories. For a critical CVE, the vendor usually pushes the fix within hours of disclosure. Run a quick check:
# Red Hat / CentOS
sudo yum check-update --security
# Debian / Ubuntu
sudo apt update && apt list --upgradable | grep -i security
# Alpine
apk version -v | grep '<'
If the patch isn't in your repo yet, check the vendor's security mailing list for an ETA. Sometimes you'll need to pull from a testing branch or build from source. That's rare for critical CVEs, but it happens.
Install the patched package on a staging server that mirrors your production environment as closely as possible. Same OS version, same application stack, same configuration. Don't test on your laptop.
Run your smoke tests
You need a test suite that covers the basics: service starts cleanly, critical API endpoints respond, background jobs run, logs are clean. If you don't have automated tests, write a checklist and work through it by hand.
For a kernel patch, verify that the system reboots without errors and that networking, disk I/O, and Docker (if you use it) still work. For an Apache or Nginx patch, confirm that virtual hosts serve traffic and SSL termination works. For OpenSSL or glibc, test anything that makes network calls—database connections, HTTP clients, email delivery.
In support tickets I handled, the most common post-patch breakage was a service that failed to restart because of a new config validation check or a slightly changed startup script. Catch that in staging.
Check for dependency conflicts
Security patches sometimes pull in new library versions or kernel ABIs that break third-party modules. If you run custom kernel modules, proprietary drivers, or compiled extensions, test them explicitly. A patched system that can't load your network driver is worse than an unpatched one.
Document what you tested and what passed. If something fails, decide whether to fix it now or accept the risk and patch anyway. A broken feature is usually better than a known RCE.
Step 3: Deploy to Production in Waves (8-20 Hours)
Once staging is green, start the production rollout. Go in waves so you can catch problems before they hit your entire fleet.
Wave 1: Canary servers (10-20% of fleet)
Pick a small subset of production servers that are representative but not mission-critical. Patch them, watch them for an hour, and confirm that error rates, latency, and resource usage stay normal.
If you're running load-balanced web servers, take one node out of rotation, patch it, and put it back. If metrics look good for 30 minutes, move to the next wave. If something breaks, you've limited the blast radius.
I like to patch one server in each availability zone or data center first. That way you catch region-specific issues (like a local repo mirror serving a corrupt package) before they spread.
Wave 2: Remaining non-critical servers
Patch the rest of your web frontends, application servers, and background workers. You can go faster here—5 or 10 servers at a time instead of one. Keep an eye on your monitoring dashboards and be ready to pause if anything looks wrong.
For servers that require a reboot (kernel patches, glibc updates), use a rolling restart pattern. If you have 20 servers behind a load balancer, reboot them in groups of 2 or 3 so you always have capacity.
Wave 3: Databases and stateful services
Save your databases, caching layers, and other stateful services for last. These are harder to roll back and more sensitive to downtime. If possible, patch replicas first and verify replication health before touching the primary.
For MySQL or PostgreSQL, patch the replicas, restart them, confirm they're replicating cleanly, then fail over to a patched replica and patch the old primary. For Redis or Memcached, you can usually restart one node at a time without user impact.
If a patch requires a reboot and you can't tolerate downtime, schedule a maintenance window. A 10-minute outage at 3 AM is better than a compromise.
Step 4: Verify and Document (20-24 Hours)
You're not done when the last server reboots. Verification and documentation close the loop.
Confirm patch levels across the fleet
Run a quick audit to make sure every server got the update:
# Check installed version (example for OpenSSL on Debian)
dpkg -l | grep openssl
# Or use a configuration management tool
ansible all -m shell -a "rpm -q openssl"
If any servers are missing the patch, investigate why. Did the package manager fail? Was the server offline during the rollout? Patch it manually and figure out how to catch stragglers earlier next time.
Update your runbook
Document what went well and what didn't. Did staging catch a regression? Did you hit a weird edge case in production? Did a server refuse to reboot because of a full /boot partition? Write it down so the next person (or future you) doesn't repeat the same mistakes.
I keep a patching post-mortem template that asks: What was the CVE? What versions were affected? What did we test? What broke? How long did the rollout take? This becomes your institutional knowledge.
Notify stakeholders
Send a short update to your team, your manager, and any customers who might care. Keep it factual: "We've deployed patches for CVE-XXXX-XXXXX across all production servers. All services are operating normally. No customer impact."
If you did hit an issue during rollout, include what happened and how you mitigated it. Transparency builds trust.
What if something breaks mid-rollout?
Pause the rollout immediately. Don't patch another server until you understand what went wrong.
If the breakage is limited to a few servers, roll them back by reinstalling the previous package version:
# Red Hat / CentOS
sudo yum downgrade package-name
# Debian / Ubuntu
sudo apt install package-name=previous-version
If the breakage is widespread and you can't find a quick fix, decide whether the CVE risk is worse than the broken functionality. A remote code execution vulnerability usually is. A local privilege escalation might not be.
In every case I've seen, the root cause was something we could have caught in staging if we'd tested more thoroughly. That's the lesson.
A Repeatable Playbook Wins
The 24-hour clock starts the moment a CVE is disclosed, not when you happen to see the announcement. Set up alerting for security advisories from your OS vendor, and make sure someone on your team is subscribed. Speed comes from having a documented process, a staging environment that mirrors production, and a culture where patching is expected, not exceptional.
