Ruby2Shell (CVE-2026-132825): Critical Ruby RCE Vulnerability

A critical security vulnerability known as Ruby2Shell has been discovered in the Ruby interpreter, potentially allowing remote code execution and denial of service. Security updates are available for Ruby 3.3, 3.4, and 4.0.

On November 18, 2026, the Ruby development team released versions 3.3.14, 3.4.13, and 4.0.10, addressing seven security vulnerabilities in the regular expression engine and string case conversion functionality.

Among these vulnerabilities is Ruby2Shell (CVE-2026-132825), a critical memory corruption flaw that may allow remote attackers to execute arbitrary code on affected servers.

Security Vulnerability

Parameter Description
CVE Identifier CVE-2026-132825
Vulnerability Name Ruby2Shell
Affected Software Ruby (CRuby)
Vulnerability Type Heap-based buffer overflow
Severity Critical
CVSS 3.1 Score (Red Hat) 9.8
Security Impact Remote Code Execution (RCE)
Authentication Required No, in certain scenarios

The vulnerability occurs during string case conversion when processing specific single-byte character encodings, including ISO-8859-1 and Windows-1252.

Under certain conditions, processing malicious input may corrupt adjacent memory, allowing an attacker to execute arbitrary code with the permissions of the Ruby application process.

Affected and Fixed Versions

Ruby Branch Affected Versions Fixed Version
Ruby 4.0 4.0.0 – 4.0.9 4.0.10
Ruby 3.4 3.4.0 – 3.4.12 3.4.13
Ruby 3.3 3.3.0 – 3.3.13 3.3.14
Ruby 2.4 – 3.2 Affected No upstream fix (EOL)

Ruby 3.2 and earlier branches have reached their end of life and will not receive security fixes from the Ruby development team. We recommend migrating to a supported release.

Affected Applications

The vulnerability may affect web frameworks and self-hosted applications that use vulnerable Ruby runtimes, including:

  • Ruby on Rails
  • Sinatra
  • GitLab
  • GitHub Enterprise Server
  • Mastodon
  • Discourse
  • Chatwoot
  • OpenProject

Applications that bundle their own Ruby runtime require vendor-provided security updates. Updating the system-wide Ruby installation may not protect these applications.

Security Impact

Successful exploitation may result in:

  • Remote code execution (RCE).
  • Memory corruption and application crashes.
  • Denial of service (DoS).
  • Unauthorized access to application data.
  • Compromise of services running under the affected Ruby process.

Internet-facing Ruby applications that process untrusted HTTP requests are particularly relevant to this vulnerability.

Strings processed exclusively in UTF-8 are not affected by this specific vulnerability. However, using UTF-8 as the default encoding does not necessarily prevent applications from processing attacker-controlled input in other encodings.

Update Recommendations

We strongly recommend that customers running Ruby-based applications on their virtual or dedicated servers install the available security updates.

Check your currently installed Ruby version:

ruby -v

Updating Ruby

For Ruby installations managed through the operating system's package manager, use the following commands.

apt update
apt install --only-upgrade 'ruby*' 'libruby*'
ruby -v
dnf upgrade 'ruby*'
ruby -v

The availability of security updates depends on your Linux distribution and configured package repositories. Distribution-maintained packages may contain backported security fixes without changing the upstream version number.

Ruby installations managed through RVM, rbenv, or other version managers must be updated separately.

After completing the update, restart all affected Ruby applications and services to ensure that they are using the updated runtime.

Containerized applications should be rebuilt and redeployed using updated base images.

Temporary Mitigation

If an immediate update is not possible, consider the following measures:

  • Restrict public access to affected applications.
  • Use a VPN or IP allowlist for administrative interfaces.
  • Restrict untrusted input using affected character encodings.
  • Enable appropriate Web Application Firewall (WAF) protection.
  • Monitor application logs for unexpected crashes and suspicious activity.

These measures may reduce exposure but do not provide complete protection against the vulnerability.

Regularly installing security updates is essential for maintaining a secure, reliable, and stable hosting environment.

cve patching rce ruby security

Java4Shell (CVE-2026-114938): Critical Java Vulnerability

A critical vulnerability known as Java4Shell has been discovered in the Java Base64 decoder, potentially allowing unauthenticated remote code execution, memory disclosure, and denial of service on affected x86-64 systems. Server administrators are strongly encouraged to update their Java installations.

Read more