漏洞信息
尽管我们使用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。神龙努力确保数据的准确性,但请您根据实际情况进行核实和判断。
Vulnerability Title
ERB has an @_init deserialization guard bypass via def_module / def_method / def_class
Vulnerability Description
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.
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Vulnerability Type
保护机制失效
Vulnerability Title
ERB 安全漏洞
Vulnerability Description
ERB是The Ruby Programming Language开源的一款嵌入式Ruby模板处理工具。 ERB存在安全漏洞,该漏洞源于ERB#def_method、ERB#def_module和ERB#def_module方法未对@src进行保护,可能导致攻击者通过Marshal.load触发反序列化时,使用ERB#def_module作为代码执行点,绕过@_init保护。以下版本受到影响:ERB 4.0.3.1之前版本、4.0.4.1之前版本、6.0.1.1之前版本和6.0.4之前版本。
CVSS Information
N/A
Vulnerability Type
N/A