Socket offers free patches for every fixable critical CVE in RubyGems

This article has been automatically translated.
Loading article...
Merry Christmas & Happy New Year!
Loading article...
A Rails app that has been running for seven or eight years has a serious vulnerability in a gem pulled in indirectly somewhere in its dependency tree, but upgrading it drags along a string of version constraints, tests have to be rerun, and interfaces may change. So the team is stuck between two bad options: ship with a known vulnerability, or risk a major version upgrade. The third option Socket offered on November 24, 2026, is to apply targeted patches to the existing version.
Socket Certified Patches generates security patches for open source packages. This time it announced that it has completed patches forall patchable critical-severity CVEs in the RubyGems ecosystem, and made them free for everyone, including developers without a Socket account or paid subscription. For Ruby/Rails teams maintaining locked or abandoned dependencies, this is indeed another path to fixing vulnerabilities without changing version numbers.
But the "100%" in the headline comes with a caveat you must see clearly: it refers to "patchable" critical CVEs, not all critical CVEs.
The key to understanding this product is the word "backport." When upstream fixes a vulnerability, it usually does so in a new version. Backporting means extracting that security fix on its own and reapplying it to the old version you still have locked. The version number stays the same; only the code that had the problem is changed.
The example given in the source is a vulnerability in Rails Active Storage, GHSA-f3w6-w445-fwh9, with a CVSS score of 9.8. It allows an unauthenticated attacker to write arbitrary files through a crafted upload, and under some configurations may further lead to remote code execution. Socket's patch lets affected applications keep using their current Rails version while closing this hole, putting the overall upgrade on their own schedule.
There is an easy misunderstanding here: patches are not a substitute for upgrades. Bug fixes, new features, and compatibility improvements in newer upstream versions are things a patch will not bring you. It only takes the decision of "when to do the major upgrade" out of the vulnerability's hands. For libraries no one maintains anymore, patches can extend the software's usable life; for actively maintained projects, they buy you time to test compatibility.
Trust is the real barrier for this kind of solution. You say it's fixed—why should I believe you? The verification chain described in the source goes roughly like this: first reproduce the vulnerability on the original dependency and confirm the same attack technique fails after patching; then run regression tests, differential tests comparing the original and patched versions, compatibility checks against supported runtimes, and performance benchmarks.
Recently they also extended testing to downstream dependents—the software that actually calls the library. This matters in practice: a gem's own test suite may not cover the way your application uses it.
The source also points out a risk specific to backporting: a fix that works fine in the latest upstream version may depend on other changes introduced over the years. Only by accounting for all these differences can you release a patch for an old version. This is exactly why, beyond the patch itself, the verification results are worth looking at.
On the Socket dashboard you can view individual patches and their verification results, including test results, exploit verification, performance data, and the specific code changes.
Previously, Socket's patching workflow mainly modified dependency files after installation. Now there are two new ways that fit directly into the package management workflow.
Neither method requires installing hooks or the Socket CLI on build machines. Once the dependency changes are committed, developers install dependencies as usual. The original in-place patching mode is still available too.
The source explicitly lists three categories of vulnerabilities generally considered unpatchable:
The source estimates that by these standards, roughly 95% of RubyGems CVEs are patchable. So "100% of patchable critical CVEs" and "95% of CVEs are patchable" should be read together, not conflated.
Below is the sequence of steps based on the commands given in the source. Note that I have not actually run these steps; the commands themselves come from the source.
curl -fsSL https://install.socket.dev/patch | shThen run socket-patch scan --dry-run in the root of your Ruby project. The expected result is a list of available fixes for your current dependency versions and the vulnerabilities they address. If the CVE you care about is not in the list, this path is not available for it—go back to upgrading or reachability analysis.
socket-patch scan
bundle installOr use vendored mode to store the patched package in the repository:
socket-patch scan --mode vendored
bundle installAlso, if a dependency includes native extensions, the source notes that starting with socket-patch CLI 5.1.0, native extensions are recompiled after patching. For packages like nokogiri, changing only the source will not update the compiled artifact your application actually runs, so this capability is necessary.
If the dependency itself is malicious, or the advisory is misattributed, patches will not solve the problem—remove the dependency or track down where the real vulnerability is. If the fix requires incompatible interface changes, patches do not apply either; replacing the dependency or doing reachability analysis is more realistic.
There is another case: if the upgrade is actually easy and test coverage is adequate, upgrading directly is still the simplest path. The value of patches lies in scenarios where upgrading is expensive or upstream has no compatible fix at all.
Critical-severity patches are free, while high-, medium-, and low-severity patches require Socket's Enterprise plan. The source says coverage for RubyGems will continue to expand to all severity levels.