When thirty critical CVEs drop on a Tuesday morning and you're running a hundred servers, you can't patch everything at once. Production systems need uptime. Staging environments need testing. Some vulnerabilities matter right now; others can wait until the weekend.
I've seen teams waste hours debating which CVE to tackle first, then rush a bad patch that breaks customer sites. A simple scoring system cuts that chaos down to five minutes of triage and a clear action list.
The three-factor score
Every CVE gets a number from zero to nine. Three questions, three points each. Add them up and you know what to patch first.
Is there a public exploit?
- 3 points: Exploit code is public (Metasploit module, GitHub PoC, or active scanning)
- 2 points: Exploitation described in detail but no ready-made tool yet
- 1 point: Proof-of-concept exists but requires significant skill
- 0 points: No known exploit; theoretical only
Check ExploitDB, GitHub, and your IDS logs. If you see scan attempts already, that's three points automatically.
Is the vulnerable service exposed to the internet?
- 3 points: Directly exposed on a public IP (web server, mail server, API)
- 2 points: Behind a firewall but accessible from customer networks or VPNs
- 1 point: Internal service; requires prior network access
- 0 points: Localhost only or air-gapped
Run a quick nmap sweep of your public IPs if you're not sure:
nmap -sV -p- --open <your-ip-range> -oG - | grep <service-name>
An Apache vulnerability on port 443 scores three. The same bug in an internal Jenkins instance scores one.
What data can an attacker reach?
- 3 points: Customer data, payment info, credentials, or root/admin access
- 2 points: Internal business data, configuration files, or user session tokens
- 1 point: Public information or low-privilege access
- 0 points: No meaningful data exposure (DoS only, isolated container)
In support tickets I handled, the usual panic was over CVEs that touched nothing sensitive. A three-point data score means drop everything. A zero-point score can wait for your normal maintenance window.
Patch order by total score
Add the three scores. You'll get a number from zero to nine.
- 9 or 8: Patch today. Test fast in staging, then push to production within hours. This is a wormable RCE on your public web server with live exploits.
- 7 to 5: Patch this week. Schedule a maintenance window, test thoroughly, deploy in batches.
- 4 to 2: Patch this month. Roll it into your regular update cycle.
- 1 or 0: Patch eventually. Add it to the next quarterly update unless something changes.
If two CVEs tie at eight, patch the one with more installations first. A WordPress plugin on fifty sites beats a custom script on two.
What if testing breaks something?
It will. Patches introduce regressions.
Keep a rollback script ready:
#!/bin/bash
# rollback.sh
sudo systemctl stop apache2
sudo apt install apache2=<old-version> --allow-downgrades -y
sudo systemctl start apache2
Replace apache2 and apt with your actual service and package manager. Test the rollback in staging before you patch production. I've seen teams patch a critical CVE at 2 AM, break TLS, and spend four hours figuring out how to downgrade because they never practiced the rollback.
Snapshot your VMs before you patch. On cPanel servers, take a backup:
/scripts/pkgacct <username>
Cloud providers let you snapshot in seconds. Use it.
Batching production patches
Don't patch all your web servers at once. Roll the update out to ten percent, wait an hour, check logs, then continue.
For a fleet behind a load balancer:
- Remove one server from the pool
- Patch it
- Run your smoke tests (curl the health endpoint, check error logs)
- Add it back to the pool
- Repeat for the next server
If your monitoring catches elevated 5xx errors, stop and roll back that server. The rest of your fleet is still clean.
The staging environment trick
Your staging environment should mirror production package versions exactly. Not close—exactly.
Create a script that pulls production package lists and installs them in staging:
# On production:
dpkg --get-selections > prod-packages.txt
# On staging:
sudo dpkg --set-selections < prod-packages.txt
sudo apt-get dselect-upgrade -y
Now when you test a patch in staging, you're testing the real scenario. I've lost count of tickets where a patch worked fine in staging but broke production because staging was running different library versions.
When the vendor has no patch yet
Sometimes a critical CVE drops and the patch won't land for days. You have three options.
Mitigation without patching
Firewall rules buy time. Block the vulnerable endpoint at the network layer:
sudo iptables -A INPUT -p tcp --dport <vulnerable-port> -j DROP
sudo iptables-save > /etc/iptables/rules.v4
Or use your web application firewall to block the exploit pattern. Cloudflare and mod_security can filter malicious requests while you wait for the real fix.
Virtual patching with WAF rules
If the CVE is an injection bug, write a WAF rule that blocks the exploit string. For example, a command injection in a query parameter:
SecRule ARGS "@rx (;|\||`|\$\()" "id:1001,phase:2,deny,status:403,msg:'Command injection attempt'"
This isn't bulletproof, but it blocks script-kiddie scans until the vendor releases the patch.
Accept the risk
Sometimes the vulnerable service isn't exposed and the exploit requires local access. Document the risk, notify your manager, and schedule the patch for your normal cycle. Not every CVE is a crisis.
Automating the triage
Once you've scored CVEs manually a few times, script it. Pull CVE feeds, match them against your installed packages, and auto-score based on your network topology.
A simple Python script that queries the NVD API and checks your dpkg or rpm output can flag high-scoring CVEs in Slack. I won't write the whole thing here, but the logic is:
- Fetch CVE JSON from NVD
- Parse CVSS score and check for exploit references
- Match CPE strings against your package list
- Check if the service listens on a public IP (
netstat -tuln) - Score it and send an alert if it's seven or higher
You'll still review it manually, but the script does the grunt work.
Triage checklist
When a batch of CVEs drops, spend five minutes on this:
- List every CVE that matches your installed packages
- Score each one (exploit, exposure, data)
- Sort by total score, high to low
- Patch anything scoring eight or nine today
- Schedule seven-to-five for this week
- Queue the rest for your normal cycle
Print the scoring rules and tape them next to your monitor. You'll reach for them every time a new CVE wave hits, and you'll stop second-guessing which fire to put out first.
