Socket Releases Free Patches for 100% of Critical CVEs in RubyGems
Fix critical RubyGems vulnerabilities without upgrading dependencies. Free security patches are now available with more ways to install and deploy them.
- Mikola Lysenko

- Wenxin Jiang

- Marvin Fleischer

- Tanmay Singla

- Jon Moroney

We've completed security patches for 100% of patchable critical-severity CVEs in the RubyGems ecosystem, and we're making those fixes available to everyone for free. Developers can now remediate these vulnerabilities without upgrading their existing dependency versions, even when an upstream fix requires a breaking change.
The milestone follows an intensive engineering sprint focused on expanding RubyGems patch coverage. During the effort, our team also made substantial improvements to the systems used to generate, test, validate, and publish security fixes.

Socket identifies six critical vulnerabilities with available patches in a sample Ruby project.
Fixing Vulnerabilities Without Dependency Upgrades
#Upgrading to a secure upstream version is generally the simplest way to address a vulnerability. But upgrades aren't always straightforward, particularly for applications that depend on older versions of libraries.
Some Ruby applications have been running for a decade or longer and still serve important functions. Their dependencies may have been abandoned, or upgrading to a supported version may require substantial changes to the application itself. In some cases, a compatible upstream fix simply doesn't exist.
Socket Certified Patches provide another option. We develop targeted security fixes for the dependency versions developers already use, often by backporting fixes from newer releases. These changes address the vulnerable code while preserving the package version and minimizing changes to its existing behavior.

For applications that depend on abandoned libraries, this can extend the useful life of software that might otherwise need to be replaced or extensively rewritten. For actively maintained applications, patches allow teams to remediate known vulnerabilities without having to coordinate an immediate dependency upgrade. They can continue upgrading on their own schedule, with time to test compatibility and address breaking changes.
Security patches don't replace the benefits of ongoing dependency maintenance. Upstream releases still provide bug fixes, new features, and compatibility improvements. But a vulnerability doesn't necessarily have to dictate when an application undergoes a larger upgrade, and in some cases, a targeted patch may be the most practical long-term solution.
Earlier this month, we released a free security fix for a critical Rails Active Storage vulnerability, tracked as GHSA-f3w6-w445-fwh9 (CVSS 9.8). The vulnerability could allow unauthenticated attackers to write arbitrary files through specially crafted uploads and, under certain configurations, potentially achieve remote code execution.
Our patch gives applications affected by the vulnerability an alternative to immediately upgrading Rails. Developers can apply the security fix to their existing dependency while planning and testing a broader upgrade separately.
The RubyGems coverage milestone extends this approach across the ecosystem's patchable critical vulnerabilities.
New Hosted and Vendored Delivery Options
#We've also expanded the ways developers can install remediated packages. Previously, Socket's patching workflow primarily involved modifying dependency files after installation. Our new hosted and vendored modes integrate directly with existing package management workflows.
Hosted mode lets developers install remediated gems through Bundler. The socket-patch CLI updates the lockfile to reference patched packages served through patch.socket.dev and, when necessary, adds source: settings to the affected gem declarations in Gemfile. The dependency versions remain unchanged, and Bundler installs the patched gems through its normal installation process.

Vendored mode stores the remediated packages directly in the application's repository under .socket/vendor/. Subsequent installations use those local packages without contacting Socket's infrastructure.
Vendored patches are yours to keep. They stay in your repository and go wherever your application goes, even if you stop using Socket.
Neither mode requires an installation hook or the Socket CLI on build machines. Once the dependency changes are committed, developers can continue installing their dependencies normally.
Both options preserve the existing dependency version. They also eliminate the need to run a separate patching step after every dependency installation. Developers can continue using the original in-place patching mode if they prefer that workflow.
These delivery options are particularly useful for organizations that need to control how dependencies enter their build environments or cannot introduce a new step into existing CI/CD pipelines.
We recently expanded support for Ruby gems containing native extensions as well. With socket-patch CLI 5.1.0, native extensions are rebuilt after patching, allowing us to remediate vulnerabilities in packages such as nokogiri, where a source-level change alone would not update the compiled code that applications execute.

Socket's dashboard provides instructions for obtaining a security patch for a critical Nokogiri vulnerability without upgrading the dependency.
Testing Security Fixes Against Existing Package Behavior
#A successful security patch needs to eliminate the vulnerability without introducing regressions elsewhere in the package.
Our validation process includes reproducing the vulnerability against the original dependency and verifying that the same exploit fails after patching. We also run regression tests, differential tests comparing the original and patched versions, compatibility checks against supported runtimes, and performance benchmarks.
We've expanded this testing to include downstream dependents, allowing us to exercise patches against software that actually relies on the affected library. This helps identify compatibility problems that may not be exposed by the package's own test suite.
Developers can inspect individual patches and their verification results on Socket, including test outcomes, exploit validation, performance measurements, and the code changes made.

These checks are especially important when backporting fixes into older library versions. A change that works correctly in the latest upstream release may depend on other changes introduced in the intervening years. Those differences must be accounted for before publishing a patch for an older release.
Some Vulnerabilities Require Different Remediation
#Our 100% critical-CVE coverage applies to vulnerabilities that can be safely patched. We generally consider three types of vulnerabilities unpatchable:
- Malicious packages: The correct remediation is to remove the malicious dependency, not attempt to repair it.
- Misattributed vulnerabilities: An advisory may identify a package that doesn't contain the vulnerable code because the vulnerability actually exists in another dependency. In those cases, we focus on fixing the package that contains the vulnerability.
- Breaking changes: Some vulnerabilities are inherent to a package's design or public interface. Fixing them would require incompatible changes, potentially making dependency replacement or reachability analysis necessary.
We evaluate these cases individually and can make exceptions for particularly serious vulnerabilities where a breaking change may be warranted. Our current assessment is that roughly 95% of RubyGems CVEs are patchable under these criteria.
Free Critical CVE Patches Are Available Now
#All Socket patches for critical-severity CVEs are free, including for developers and organizations without a Socket account or paid subscription.
To get started, install the standalone socket-patch CLI:
curl -fsSL https://install.socket.dev/patch | sh
From a Ruby project's root directory, preview the available fixes without modifying any files:
socket-patch scan --dry-run
To apply patches in the default hosted mode and install the remediated gems:
socket-patch scan bundle install
Alternatively, use vendored mode to store the patched packages in the repository:
socket-patch scan --mode vendored bundle install
The CLI identifies available security fixes for the specific dependency versions in the project and reports which vulnerabilities they address. Patches for high-, medium-, and low-severity vulnerabilities are available through Socket's Enterprise plan.
For more information about patch validation, delivery options, and supported package managers, see our Certified Patches documentation and installation guide.
We're continuing to expand RubyGems coverage across all severity levels while improving our ability to generate, validate, and distribute security fixes. The free critical patches are available now.




