How to Prioritize Which CVEs to Fix First
You run bundler-audit against your app, and the list is longer than you have time for, with a good share of it flagged HIGH or CRITICAL. There are too many to patch at once, and every one looks urgent. Sorting by severity doesn’t help when everything is already labeled critical, and a list where everything is top priority gives you no priority at all.
In this post, you’ll learn how to combine three public scoring signals, CVSS, the CISA KEV catalog, and EPSS, to narrow your application’s dependency advisories down to a list, and then how to check whether each flaw on that list is actually reachable in your codebase. Think of it as the systematic version of picking CVEs by hand, which is what we did in Don’t Just Upgrade Rails: 7 CVEs to Patch .
Why a wall of CRITICALs isn’t a plan
The instinct is to sort by severity and start at the top. That works when “critical” is a short list, not when it is most of the report. An app that has fallen a couple of Rails versions behind can easily carry dozens of advisories across Rails itself, Rack, Nokogiri, and the rest of its Gemfile.lock, and at that point severity has stopped being a filter. A “critical” in a code path you never touch and one attackers are using this week get the same color.
The question you actually need answered is “which of these is likely to be exploited, and could it be exploited in my app?” No single number answers that, but a few of them together get you most of the way.
Three signals for how dangerous a CVE is
None of the scoring systems below is perfect on its own. Each one answers a different question, and they are most useful read side by side.
CVSS: how bad the flaw could be
The Common Vulnerability Scoring System is the 0 to 10 score behind the LOW, MEDIUM, HIGH, and CRITICAL labels your scanner prints. It measures the technical severity of a flaw: how it can be attacked, how complex the attack is, whether the attacker needs to be logged in, and how much damage a successful exploit does.
What the base score doesn’t measure is whether anyone is exploiting the flaw, or whether it applies to your setup at all. A CVE documenting a “critical” flaw in a gem feature you never use is still scored critical. CVSS tells you how much it would hurt if it happened, so pair it with the next two signals, which speak to how likely it is to happen.
KEV: whether it’s already being exploited
The CISA Known Exploited Vulnerabilities catalog is a list, maintained by the US Cybersecurity and Infrastructure Security Agency, of vulnerabilities with confirmed real-world exploitation. A CVE only lands on it when there is evidence that attackers are actively using it, not just that they theoretically could. For federal agencies it is binding, with a remediation deadline on every entry, and while you are probably not a federal agency, those deadlines are still a useful public signal of how seriously a given vulnerability is taken.
KEV is the strongest of the three signals, but it only looks backward. It lists what has already been exploited, and a CVE can be under attack for a while before it is added. It is also common for none of the advisories in a gem scan to appear on it at all, which is exactly when the next signal earns its place.
EPSS: how likely it is to be exploited soon
The Exploit Prediction Scoring System , maintained by FIRST, estimates the probability that a CVE will see exploitation activity in the wild in the next 30 days. Scores run from 0 to 1, come with a percentile so you can see how a CVE ranks against all the others, and are recalculated daily.
Where KEV looks backward, EPSS looks forward: it is the signal that can flag a CVE before it ever reaches the catalog. It is also a probability, not a verdict, so a low score means “unlikely” rather than “safe”.
Together, these three give you a better idea of what could be dangerous and what attackers are paying attention to. What they can’t tell you is whether your codebase is exposed, and that takes a closer look at the flaw itself.
Getting the signals for your gems
bundler-audit checks your Gemfile.lock against ruby-advisory-db and reports each vulnerable gem with its advisory ID, a criticality rating based on the advisory’s CVSS score, and a link to the advisory itself. If you’d rather not install anything, audit.fastruby.io runs the same bundler-audit check against a Gemfile.lock you upload. It lists each advisory’s ID and links to the advisory, where you’ll find the severity rating. Some advisories are reported by their GitHub Security Advisory ID (GHSA-...) rather than a CVE ID. KEV and EPSS are keyed by CVE, so open the advisory link and copy the CVE ID listed there. If the advisory has no CVE ID, it won’t appear in either source, and its severity rating is the only score you have. With the CVE IDs in hand, matching them against KEV is a straightforward cross-reference against the catalog’s public JSON feed , and EPSS scores can be looked up by CVE ID the same way.
One thing to keep in mind about scope: this covers what’s in your Gemfile.lock. If your app runs in a container, the system libraries in the image are a separate layer with their own CVEs, and sometimes they decide whether a gem fix even works, as with CVE-2026-66066 . That layer needs its own scanner and is outside what this post covers.
Is the flaw reachable in your codebase?
Once the signals have given you a list, work through each CVE on it with the questions below. They are ordered from simplest to most involved, and a confident “no” at any step usually means you can stop there and record the CVE as not affecting you. Run them on the list rather than the full report: this is the expensive part, and it is worth spending only on the CVEs the signals say matter.
- Is the vulnerable version present? Check
Gemfile.lock, which includes your transitive dependencies, not just the gems in yourGemfile.bundler-auditdoes this for you, but it is worth confirming which version is actually locked. - Is the vulnerable code loaded? Many Rails CVEs live in one specific piece of the framework: Active Storage, Action Text, a particular middleware. If your
config/application.rbrequires frameworks individually instead ofrails/alland the affected one isn’t among them, orbin/rails middlewareshows the affected middleware isn’t in your stack, that is a strong case for “not affected”. A gem listed withrequire: falseisn’t a “not affected” case on its own, though. That option only keeps Bundler from loading the gem at boot. Your code may still load it later inside a job or rake task, another gem may load it for you (Active Storage does this withimage_processing), and a command-line tool like a linter runs its code without the app loading it at all. Search for where the gem is loaded and check which other gems depend on it before you rule it out. - Is it reachable? Read the advisory and the fix commit, find the vulnerable method, and search for call sites. Don’t put too much trust in a clean grep: Ruby’s dynamic dispatch (
send) hides calls, and framework code like parameter parsing runs on every request whether your code mentions it or not. For a transitive dependency, search your other gems too. Takeaddressable, which is in most Rails bundles because gems like WebMock and Octokit depend on it. CVE-2026-35611 is a regular expression denial of service that only affects URI template matching, so the code to look for isAddressable::Templateand itsmatchandextractmethods.grep -rl "Addressable::Template" $(bundle list --paths)searches every installed gem at once. When we ran it on the app that serves this blog, it turned up two gems besides addressable itself. WebMock is in thetestgroup, so it was out. Sawyer, the HTTP client Octokit uses to talk to GitHub, runs in production, but it only builds templates toexpandthem into URLs and never callsmatchorextract, so this CVE was a “no” at this step. Semgrep Supply Chain automates this reachability check for Ruby, which can take a lot of the manual searching off your plate, though it’s worth spot-checking its results the same way. - Can an attacker control the input? A reachable flaw only matters if attacker-supplied data can get to it. Trace where the input to the vulnerable path comes from, and whether a user has to be authenticated (or an admin) before they can send it. The CVSS Attack Vector and Privileges Required metrics give you the advisory’s view of this; your job is to check it against your app.
- Are the preconditions met? Rails advisories often depend on configuration, along the lines of “only affects applications using X with Y enabled”. The advisory’s “Impact” and “Workarounds” sections usually spell this out, and CVSS 4.0 captures it in its Attack Requirements metric.
- Is it exposed, and are there mitigations? Consider whether the affected app is internet-facing, and whether a WAF rule, a proxy, or another layer already blocks the attack. An internal admin tool that’s only reachable over a VPN is less urgent than the same CVE in your public-facing app.
-
Record the decision. Write down what you concluded and why, ideally in a machine-readable form (more on that below), so nobody has to repeat this analysis the next time the same CVE shows up in a scan. The simplest place to start is bundler-audit’s own config file: add the advisory ID under
ignorein a.bundler-audit.ymlat the root of your app, with a comment explaining why, andbundle-audit checkstops reporting it. For theaddressableCVE from step 3, that looks like this:--- ignore: # Only Addressable::Template#match and #extract are affected. Sawyer only # calls #expand, and WebMock is in the test group. Reviewed 2026-10-28. - CVE-2026-35611Include the date, and revisit the list when you upgrade: an ignored advisory stays silent even after someone starts calling the vulnerable code.
These questions aren’t arbitrary: each “no” in steps 1 through 6 lines up with one of the standard justifications a VEX document uses for marking a vulnerability “not affected”, from “component not present” through “inline mitigations already exist”.
Putting it together: what to fix first
With the signals and the reachability check in hand, the order mostly falls out on its own:
- On the KEV list and reachable. Fix these first. It is being exploited somewhere, and it can be exploited in your app. Treat the CISA remediation deadline as a reference point.
- High EPSS and reachable. Not confirmed as exploited yet, but likely to be soon. These come next.
- High CVSS, low EPSS, and reachable. Serious if it happens, but nobody seems to be trying. Schedule these into your regular patching rather than dropping everything.
- Not reachable, whatever the scores. Record why, and pick up the fix in your normal upgrade cycle. Upgrading is often cheap, and “not reachable” can stop being true the day someone enables the feature.
Within each group, break ties by exposure (production and internet-facing first), and if you maintain several apps, by how many of them carry the same vulnerable gem. And watch for upgrades that clear several advisories at once, like a Rails patch release that bumps a handful of framework gems together, since those can be worth doing ahead of the order above. How hard the upgrade is matters too: a patch-level bump is an afternoon, while a fix that only exists in the next major version of Rails is a project, and that one may need a mitigation in the meantime.
One more case comes up once you start fixing: CVEs with no fixed version. Some are simply waiting on a release that hasn’t shipped yet, and those you monitor and apply the moment it lands. Others will not be fixed at all: the maintainers disputed the report, decided it reflects expected behavior, or the gem is no longer maintained. Those you document and mitigate, consciously accept, or plan to replace the gem. On a KEV, a disputed or won’t-fix call deserves a harder look than usual, since it is worth verifying against how your own app uses the gem before you trust it.
Keeping it from coming back
A one-off triage clears the backlog, but it does not keep it clear. New advisories get published, new entries get added to the KEV catalog, EPSS scores shift daily, and your Gemfile.lock starts falling behind the day after you update it. To keep up, run the checks in your CI pipeline, so that remediation is continuous rather than a periodic audit.
The mechanism for carrying your decisions forward is VEX, short for Vulnerability Exploitability eXchange. A VEX document is a machine-readable statement about whether a given product is actually affected by a vulnerability, with a status like “not affected”, “affected”, “fixed”, or “under investigation”, plus a justification. It is the natural home for the decisions from the reachability check. Wired into CI, it lets the pipeline carry those decisions forward: findings you judged not exploitable stay suppressed on every build, while the ones that still matter keep surfacing. If your team prefers a decision framework to a document format, CISA’s SSVC (Stakeholder-Specific Vulnerability Categorization) decision tree covers similar ground, sorting each vulnerability into Track, Track*, Attend, or Act.
It is worth being precise about how VEX and KEV differ, because they are easy to conflate. KEV is a global statement: this vulnerability is being exploited somewhere in the world. VEX is a local one: this vulnerability does, or does not, actually affect our product. KEV raises a finding’s priority, and VEX records what you concluded about it so you do not have to reach that conclusion by hand the next time.
Conclusion
In this post we used three signals to narrow the advisories in a Gemfile.lock: CVSS for how bad a flaw could be, KEV for whether it is already being exploited, and EPSS for how likely it is to be exploited soon. Then we checked whether each flaw on the list was actually reachable in the codebase, and ranked what was left. Just keep in mind that these signals decide what to fix first, not what to ignore: a CVE that isn’t on the KEV list and has a low EPSS score today can still be dangerous tomorrow.
Not sure which of your dependency advisories actually matter, or how far behind your Rails app has fallen? Contact us for a security audit!