ruby erb up to 4.0.4/6.0.3 eval protection mechanism

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.7$0-$5k0.00

Summaryinfo

A vulnerability classified as problematic has been found in ruby erb up to 4.0.4/6.0.3. The impacted element is the function eval. The manipulation leads to protection mechanism. This vulnerability is uniquely identified as CVE-2026-41316. The attack is possible to be carried out remotely. No exploit exists. It is recommended to upgrade the affected component.

Detailsinfo

A vulnerability was found in ruby erb up to 4.0.4/6.0.3 and classified as problematic. This issue affects the function eval. The manipulation with an unknown input leads to a protection mechanism vulnerability. Using CWE to declare the problem leads to CWE-693. The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. Impacted is confidentiality, integrity, and availability. The summary by CVE is:

ERB is a templating system for Ruby. Ruby 2.7.0 (before ERB 2.2.0 was published on rubygems.org) introduced an `@_init` instance variable guard in `ERB#result` and `ERB#run` to prevent code execution when an ERB object is reconstructed via `Marshal.load` (deserialization). However, three other public methods that also evaluate `@src` via `eval()` were not given the same guard: `ERB#def_method`, `ERB#def_module`, and `ERB#def_class`. An attacker who can trigger `Marshal.load` on untrusted data in a Ruby application that has `erb` loaded can use `ERB#def_module` (zero-arg, default parameters) as a code execution sink, bypassing the `@_init` protection entirely. ERB 4.0.3.1, 4.0.4.1, 6.0.1.1, and 6.0.4 patch the issue.

It is possible to read the advisory at github.com. The identification of this vulnerability is CVE-2026-41316 since 04/20/2026. The exploitation is known to be difficult. The attack may be initiated remotely. No form of authentication is needed for a successful exploitation. Technical details of the vulnerability are known, but there is no available exploit.

The vulnerability scanner Nessus provides a plugin with the ID 314590 (Amazon Linux 2 : ruby, --advisory ALAS2-2026-3284 (ALAS-2026-3284)), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 4.0.3.1, 6.0.1.1 or 6.0.4 eliminates this vulnerability.

The vulnerability is also documented in the databases at Tenable (314590), EUVD (EUVD-2026-25385) and CERT Bund (WID-SEC-2026-1187). Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Affected

  • Red Hat Enterprise Linux
  • Oracle Linux
  • RESF Rocky Linux
  • Open Source Ruby
  • Open Source Ruby on Rails
  • Amazon Linux 2

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.8
VulDB Meta Temp Score: 6.7

VulDB Base Score: 5.6
VulDB Temp Score: 5.4
VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA Base Score: 8.1
CNA Vector (GitHub_M): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Protection mechanism
CWE: CWE-693
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Yes

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 314590
Nessus Name: Amazon Linux 2 : ruby, --advisory ALAS2-2026-3284 (ALAS-2026-3284)

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: erb 4.0.3.1/6.0.1.1/6.0.4

Timelineinfo

04/20/2026 CVE reserved
04/24/2026 +4 days Advisory disclosed
04/24/2026 +0 days VulDB entry created
07/09/2026 +76 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: GHSA-q339-8rmv-2mhv
Status: Confirmed

CVE: CVE-2026-41316 (🔒)
GCVE (CVE): GCVE-0-2026-41316
GCVE (VulDB): GCVE-100-359267
EUVD: 🔒
CERT Bund: WID-SEC-2026-1187 - Ruby und Ruby on Rails (erb gem): Schwachstelle ermöglicht Codeausführung

Entryinfo

Created: 04/24/2026 07:44
Updated: 07/09/2026 13:39
Changes: 04/24/2026 07:44 (65), 04/24/2026 18:34 (1), 05/14/2026 19:00 (2), 07/09/2026 13:39 (7)
Complete: 🔍
Cache ID: 216::103

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Interested in the pricing of exploits?

See the underground prices here!