Protection Mechanism Failure Affecting erb package, versions <4.0.3.1>=4.0.0, <4.0.4>=5.0.0, <6.0.1.1>=6.0.2, <6.0.4


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (14th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUBY-ERB-16636179
  • published11 May 2026
  • disclosed24 Apr 2026
  • creditTristanInSec

Introduced: 24 Apr 2026

NewCVE-2026-41316  (opens in a new tab)
CWE-693  (opens in a new tab)

How to fix?

Upgrade erb to version 4.0.3.1, 4.0.4, 6.0.1.1, 6.0.4 or higher.

Overview

Affected versions of this package are vulnerable to Protection Mechanism Failure in the def_module, def_method, or def_class methods due to insufficient deserialization guards. An attacker can achieve arbitrary code execution by supplying crafted input to Marshal.load in a Ruby application that loads untrusted data.

CVSS Base Scores

version 4.0
version 3.1