Critical Security Flaw in Ruby Package: Arbitrary Code Execution via ERB Deserialization Bypass

ruby Updated 19 May 2026

Summary

19/05/2026
N/A
Yes i
High
8.1

RLSA-2026:18039: Important: ruby security update. Affects ruby versions < 0:3.0.7-166.el9_7. Fixed in 0:3.0.7-166.el9_7. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Ruby is an extensible, interpreted, object-oriented scripting language widely used for web development, system management, and text processing. It is known for its simplicity and productivity, allowing developers to write clean and maintainable code. However, the recent vulnerability discovered in the ERB (Embedded Ruby) component poses a significant risk, enabling arbitrary code execution through deserialization bypass, which could lead to severe security breaches.

Vulnerability Detail

The vulnerability, identified as CVE-2026-41316, arises from a flaw in the ERB component of Ruby that allows attackers to execute arbitrary code by exploiting deserialization bypass. This issue can be triggered when untrusted input is processed, potentially leading to unauthorized access, data manipulation, or system compromise. The CVSS score for this vulnerability is 8.1, indicating a high severity level that necessitates immediate attention from developers and system administrators.

How To Fix

Minimum fixed version

0:3.0.7-166.el9_7

This is the first release that contains the fix.

sudo dnf update ruby

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, it is advisable to avoid processing untrusted input with ERB until the package is updated. This can help mitigate the risk of arbitrary code execution while waiting for the official patch.

Conclusion

The discovery of CVE-2026-41316 in the Ruby package highlights a critical security vulnerability that can lead to arbitrary code execution. It is essential for developers and system administrators to update their Ruby installations to the latest patched version to protect their applications from potential attacks. Utilizing tools like Vulert can further enhance security by providing real-time monitoring for open-source vulnerabilities.

See every vulnerability recorded for ruby →

Share this vulnerability

FAQ

CVE-2026-41316 is a security vulnerability in the Ruby programming language that allows arbitrary code execution via a deserialization bypass in the ERB component.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability.

The vulnerability can lead to unauthorized access, data manipulation, and system compromise, posing a significant risk to applications using the affected Ruby version.

Yes, a patch is available in Ruby version 3.0.7-166.el9_7 and later. It is recommended to update to this version to mitigate the risk.

If immediate updating is not possible, avoid processing untrusted input with ERB as a temporary workaround to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for ruby.

How To Fix

Minimum fixed version

0:3.0.7-166.el9_7

This is the first release that contains the fix.

sudo dnf update ruby

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback