RubyGems vulnerability checker
Check any version of a Ruby gem for known vulnerabilities without bundling it. See each CVE, its severity and the gem version that fixes it.
The gem’s name as in Gemfile.lock: rack, nokogiri.
One exact version, as in your lockfile. Not a range.
This tool asks the OSV API directly from your browser. It sends the gem name and the version you check, and nothing is sent to HardenKit.
How to use the RubyGems vulnerability checker
- Enter the gem’s name as it appears in Gemfile.lock.
- Enter the exact version, without a platform suffix.
- Press the button to ask OSV.
- Read the table, worst first, then bundle update the gem to the “Fixed in” version or later.
About this tool
A Rails application depends on a long list of gems, and a handful of them, such as rack, nokogiri and the Rails gems themselves, account for most of the security advisories. Enter a gem name and an exact version here to see which known vulnerabilities cover it and which release fixes each, without running bundle install.
Take both from Gemfile.lock, not from the Gemfile. The Gemfile holds constraints such as ~> 2.2; the lockfile holds the version Bundler chose. Gems with native code are listed with a platform after the version, as in nokogiri 1.16.0-x86_64-linux: enter the number only. Gem names are matched exactly, so write them as the lockfile does, in lower case with their hyphens and underscores.
The data comes from OSV, which carries the GitHub Advisory Database’s RubyGems advisories. The usual command line tool is bundler-audit, a separate gem that compares a whole Gemfile.lock with the Ruby Advisory Database. This page is for one gem at one version: a quick answer when an advisory lands and you want to know whether your pin is in range.
Sources
Questions
bundler-audit reads Gemfile.lock and reports on every gem in it, using the Ruby Advisory Database. This checker looks up a single gem version in OSV and needs no Ruby installed. Use bundler-audit in CI and this page for one-off questions.
In Gemfile.lock, under specs, or by running bundle list or gem list. The Gemfile only holds the constraint you wrote, which may allow many versions.
Rails is a set of gems: actionpack, activerecord, activesupport and others, each with its own advisories. Check the gem the advisory names. The rails gem itself is mostly a list of dependencies.
Then the advisory names no fixed release for your version line. Read the advisory for a workaround, check whether the gem is still maintained, and consider replacing it. An unmaintained gem will not get the next fix either.