Skip to content
Back to Blog
Security8 min read

Critical CVE Response Process: 6-Hour Patching Workflow

A step-by-step response workflow for patching critical CVEs in production, from alert to deployment in under six hours.

Written by Abdul AbrorTechnical Hosting Support Engineer
Critical CVE Response Process: 6-Hour Patching Workflow
On this page

When a critical CVE hits your notifications at 2 AM, the clock starts immediately. You need a repeatable process that moves fast without breaking production. I've walked through dozens of emergency patches over the years, and the teams that respond well all follow the same basic structure: assess fast, test thoroughly, deploy carefully.

Hour 0-1: Triage and Scope

The first hour determines everything that follows. Start by confirming the vulnerability actually affects your infrastructure—don't waste time patching systems that aren't vulnerable.

Check three things in order:

  1. Affected software and versions – Does the CVE target software you're running? Check your inventory against the vendor advisory.
  2. Exposure surface – Is the vulnerable service internet-facing or internal-only? A public-facing Apache vulnerability demands faster action than an internal tool.
  3. Exploit availability – Has working exploit code been published? If yes, assume active scanning has already started.

Document your findings in a shared channel or ticket. I use a simple template:

CVE: [ID]
Affected: [list of servers/services]
Exposure: [public/internal]
Exploit: [public/PoC only/none]
Priority: [critical/high/medium]

This cuts down on repeated questions as more people join the response.

Identify All Affected Systems

Your asset inventory should tell you instantly which servers run the vulnerable package. If you don't have one, you're about to learn why you need it. For now, run a quick audit.

On RPM-based systems:

for host in $(cat servers.txt); do
  ssh $host "rpm -qa | grep vulnerable-package"
done

For Debian/Ubuntu:

for host in $(cat servers.txt); do
  ssh $host "dpkg -l | grep vulnerable-package"
done

Tag systems by criticality: production customer-facing, production internal, staging, dev. Patch production first, but don't skip the others—compromised dev boxes are common pivot points.

Hour 1-2: Staging and Testing

Never patch production cold. Even vendor-supplied patches can break dependencies or change behavior in ways the vendor didn't test against your specific stack.

Spin up a staging replica that mirrors production as closely as possible. If you don't have staging infrastructure, use a snapshot or clone of a production server in a non-customer-facing network. The goal is identical software versions and configs.

Apply the patch following the vendor's instructions exactly. For most Linux distributions, that means standard package manager updates:

# RHEL/CentOS/AlmaLinux
sudo yum update vulnerable-package -y

# Debian/Ubuntu
sudo apt update
sudo apt install --only-upgrade vulnerable-package -y

Restart any affected services:

sudo systemctl restart service-name
sudo systemctl status service-name

Run your standard smoke tests. At minimum, verify:

  • Service starts and listens on expected ports
  • Application responds to health check endpoints
  • Database connections succeed
  • Critical user workflows complete

Check system logs for errors that appeared after the patch:

sudo journalctl -u service-name --since "10 minutes ago"
sudo tail -n 100 /var/log/application.log

If the patch causes regressions, you have a decision tree: Can you mitigate the CVE another way (firewall rules, disable feature, WAF rule)? Is the regression worse than the vulnerability? Document your reasoning either way.

Hour 2-4: Production Deployment

Once staging validates clean, move to production. Deploy in stages if you have multiple servers.

Rolling Deployment

Patch one server at a time, verify it's healthy, then move to the next. Remove each server from the load balancer before patching:

# Example with HAProxy
echo "disable server backend/server1" | socat stdio /var/run/haproxy.sock

Patch and restart, wait 2-3 minutes, check logs and metrics. If metrics look normal, return it to the pool:

echo "enable server backend/server1" | socat stdio /var/run/haproxy.sock

Repeat for each server. This limits blast radius—if something breaks, only one server is affected and you can roll back while the others keep serving traffic.

Single-Server Environments

If you're running a single cPanel server or VPS, you don't have the luxury of a rolling deploy. Schedule a brief maintenance window (15-30 minutes). Notify customers through your status page or support channels.

Before patching, take a snapshot if your provider supports it. Most VPS control panels offer instant snapshots you can restore in minutes.

Apply the patch, restart services, verify functionality. Keep the maintenance window open until you've confirmed at least three successful customer interactions or test transactions.

Configuration Management

If you use Ansible, Salt, Puppet, or similar, push the patch through your automation. Hand-patching creates configuration drift that will bite you later.

Example Ansible playbook snippet:

- name: Apply critical security patch
  hosts: production
  serial: 1
  tasks:
    - name: Update vulnerable package
      yum:
        name: vulnerable-package
        state: latest
      when: ansible_os_family == "RedHat"

    - name: Restart service
      systemd:
        name: service-name
        state: restarted

    - name: Wait for service
      wait_for:
        port: 80
        delay: 10

The serial: 1 directive ensures Ansible patches one host at a time.

Hour 4-5: Verification and Monitoring

Patching is not complete until you've verified the vulnerability is actually closed. Use a vulnerability scanner or manual verification depending on the CVE.

For remote code execution vulnerabilities, try the published exploit (or a safe variant) against your patched systems. If exploit code isn't public, check that the vulnerable code path has been altered:

# Example: verify Apache version after patching
httpd -v
curl -I https://yourserver.com | grep Server

Monitor error rates, response times, and resource usage for at least an hour post-deployment. Set up temporary alerts if needed:

# Quick CPU watch
watch -n 5 'top -bn1 | head -20'

# Monitor error log in real-time
tail -f /var/log/httpd/error_log | grep -i error

In support tickets I've handled, the most common post-patch issues show up in the first 30 minutes: increased memory usage, timeout errors, or broken integrations. Catch them early.

Hour 5-6: Documentation and Post-Mortem

Document what you patched, when, and any issues encountered. Future you (or your replacement) will need this when the next CVE drops.

Your incident record should include:

  • CVE identifier and description
  • List of affected systems and their patch times
  • Any workarounds or mitigations applied
  • Rollback procedures tested (or not)
  • Lessons learned

Update your runbooks with anything you learned. If staging didn't catch an issue, figure out why. If your inventory was incomplete, fix it now while the pain is fresh.

Schedule a quick team review within 48 hours. Not a blame session—a process review. What slowed you down? What would make the next response faster?

What If You Miss the Six-Hour Window?

Sometimes you can't hit six hours. The vendor patch isn't ready yet, or testing reveals a breaking change, or you're a solo admin and it's 3 AM.

Mitigation buys you time. Options depend on the vulnerability:

  • Firewall rules – Block access to the vulnerable service from untrusted networks
  • WAF rules – Deploy signatures that catch known exploit patterns
  • Disable features – Turn off the vulnerable functionality if it's not critical
  • Network segmentation – Isolate affected systems behind additional access controls

These aren't permanent fixes, but they reduce risk while you work on proper patching. Document your mitigations clearly so you remember to remove them after patching.

Automation and Preparation

The six-hour timeline assumes you have infrastructure in place before the CVE drops. You can't build staging environments during an active incident.

Before the next critical CVE:

  • Maintain an accurate asset inventory (automated scanning helps)
  • Set up staging/test environments that mirror production
  • Document your deployment process in runbooks
  • Configure monitoring and alerting
  • Subscribe to vendor security mailing lists
  • Test your backup and snapshot restore procedures

Automate what you can. I've seen teams cut response time in half by scripting the inventory check, staging deployment, and basic verification steps. The patching decision stays manual, but everything around it can be faster.

Keep Your Systems Patchable

The best critical CVE response is the one you can execute without thinking. That means your infrastructure stays current enough that emergency patches don't require major version jumps or dependency rewrites.

Schedule regular patching cycles. Monthly for most systems, weekly for internet-facing services. When a critical CVE hits, you're applying one update to already-maintained systems—not catching up on a year of neglect.

Keep your runbooks current and your backups tested. The middle of an incident is too late to discover your staging environment diverged from production six months ago or your snapshot restore procedure doesn't actually work.

FAQ

Q: Should I patch during business hours or wait for a maintenance window?

For critical CVEs with public exploits, patch immediately. The risk of a compromised server outweighs the risk of brief downtime. For high-severity without active exploitation, a scheduled window is reasonable.

Q: What if the patch breaks production?

Roll back immediately using your snapshots or previous package versions. Then deploy your mitigation strategy (firewall rules, WAF) while you troubleshoot the patch issue with the vendor.

Q: Do I need to patch staging and dev environments?

Yes. Compromised dev boxes can access production databases, source code, and credentials. Patch everything, just prioritize production first.

Q: How do I handle patching managed WordPress sites?

For plugin/theme CVEs, use WP-CLI to update across multiple sites. For core WordPress vulnerabilities, test the update on one site first, then script the deployment to others.