A deserialization vulnerability (CVE-2026-41316) has been disclosed in the Ruby ERB gem. The flaw allows attackers to bypass the @_init guard that normally prevents code execution during Marshal.load deserialization, by invoking ERB#def_method, ERB#def_module, or ERB#def_class — which evaluate template source without checking
Table of contents
CVE-2026-41316: ERB @_init deserialization guard bypass via def_module / def_method / def_classHistorySort: