Critical Security Flaw in Ruby Packages: ERB Deserialization Bypass

ruby Updated 20 May 2026

Summary

18/05/2026
N/A
Yes i
Unrated
Not published

ALSA-2026:18039: Important: ruby security update. Affects ruby versions < 3.0.7-166.el9_7. Fixed in 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 Your last release was probably never penetration tested 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 a dynamic, open-source programming language known for its simplicity and productivity. It supports multiple programming paradigms and is widely used for web development, particularly with the Ruby on Rails framework. The language includes features for text processing and system management, making it versatile for various applications. However, recent vulnerabilities have raised concerns about its security, particularly regarding the ERB (Embedded Ruby) templating system, which can lead to arbitrary code execution if exploited.

Vulnerability Detail

The vulnerability identified as CVE-2026-41316 pertains to a deserialization bypass in the ERB component of Ruby. This flaw allows an attacker to execute arbitrary code by manipulating the deserialization process, potentially leading to unauthorized access or control over the affected system. The risk is particularly significant in applications that utilize ERB templates to render dynamic content, as attackers can exploit this vulnerability to execute malicious code within the application context.

How To Fix

Minimum fixed version

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

If immediate patching is not feasible, consider disabling ERB processing in your application or using alternative templating engines that do not exhibit this vulnerability. This can help mitigate the risk until the packages can be updated.

Conclusion

The vulnerability CVE-2026-41316 poses a significant risk to Ruby applications using ERB templates, allowing for arbitrary code execution. It is crucial to update affected packages to their patched versions to mitigate this risk. Regular monitoring and timely updates are essential for maintaining the security of your applications.

See every vulnerability recorded for ruby →

Share this vulnerability

FAQ

CVE-2026-41316 is a security vulnerability in Ruby's ERB component that allows for arbitrary code execution through deserialization bypass.

You can use tools like Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.

Exploitation of this vulnerability can lead to unauthorized access, data breaches, and control over the affected system, posing significant security risks.

It is recommended to regularly update your Ruby packages and dependencies to ensure you are protected against known vulnerabilities and security flaws.

If immediate updates are not possible, consider implementing workarounds such as disabling ERB processing or using alternative templating engines until you can apply the necessary patches.

Related vulnerabilities

Recent vulnerabilities recorded for ruby.

How To Fix

Minimum fixed version

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