Security advisories: multiple vulnerabilities in Regexp and String case conversion
Security advisories: multiple vulnerabilities in Regexp and String case conversion
Security advisories: multiple vulnerabilities in Regexp and String case conversion Posted by mame on 18 Nov 2026 Seven vulnerabilities have been discovered in Ruby’s regular expression engine and in the case conversion of strings. We are aware of PoCs that prove some of them can be used to trigger remote code execution. We have released Ruby 4.0.10, 3.4.13 and 3.3.14 to fix them. We strongly recommend upgrading. CVE identifiers have been requested for these vulnerabilities but have not been assigned yet, so this advisory refers to them by their GitHub Security Advisory (GHSA) identifiers.
安全公告:Regexp 和字符串大小写转换中的多个漏洞。由 mame 于 2026 年 11 月 18 日发布。Ruby 的正则表达式引擎和字符串大小写转换中发现了七个漏洞。我们已知悉一些概念验证(PoC),证明其中一些漏洞可被用于触发远程代码执行。我们已发布 Ruby 4.0.10、3.4.13 和 3.3.14 来修复这些问题。我们强烈建议进行升级。这些漏洞已申请 CVE 标识符,但尚未分配,因此本公告通过其 GitHub 安全公告(GHSA)标识符来指代它们。
GHSA-34m4-m9fh-gqp5: Heap buffer overflow in case conversion of strings Ruby has a one-byte heap-based buffer overflow in the case conversion of strings. Changing the case of a crafted string may allow remote code execution. We are aware of PoCs that prove this flaw can be used to trigger RCE in some scenarios.
GHSA-34m4-m9fh-gqp5:字符串大小写转换中的堆缓冲区溢出。Ruby 在字符串大小写转换中存在一个单字节的基于堆的缓冲区溢出。更改精心构造的字符串的大小写可能允许远程代码执行。我们已知悉一些 PoC,证明该缺陷在某些场景下可被用于触发远程代码执行(RCE)。
GHSA-7x2q-68qv-6p8x: Double free in regular expression compilation Ruby has a double free in its regular expression engine. Compiling a crafted regular expression pattern may allow remote code execution in applications that compile attacker-controlled patterns. We are aware of PoCs that prove this flaw can be used to trigger RCE in some scenarios.
GHSA-7x2q-68qv-6p8x:正则表达式编译中的双重释放。Ruby 的正则表达式引擎中存在双重释放漏洞。在编译攻击者控制的模式的应用程序中,编译精心构造的正则表达式模式可能允许远程代码执行。我们已知悉一些 PoC,证明该缺陷在某些场景下可被用于触发 RCE。
GHSA-87fm-7w84-j2px: Integer overflow in case conversion of strings Ruby has an integer overflow in the case conversion of strings, which causes a heap-based buffer overflow. Changing the case of a crafted string may allow remote code execution. We are aware of PoCs that prove this flaw can be used to trigger RCE in some scenarios.
GHSA-87fm-7w84-j2px:字符串大小写转换中的整数溢出。Ruby 在字符串大小写转换中存在整数溢出,这会导致基于堆的缓冲区溢出。更改精心构造的字符串的大小写可能允许远程代码执行。我们已知悉一些 PoC,证明该缺陷在某些场景下可被用于触发 RCE。
GHSA-wpqw-5qxg-m68r: Out-of-bounds read in case-insensitive regular expression matching Ruby has an out-of-bounds read in its regular expression engine. Matching against a crafted regular expression pattern may allow remote code execution in applications that use attacker-controlled patterns. We are aware of PoCs that prove this flaw can lead to memory corruption in an attacker-controlled way.
GHSA-wpqw-5qxg-m68r:不区分大小写的正则表达式匹配中的越界读取。Ruby 的正则表达式引擎中存在越界读取漏洞。在处理攻击者控制模式的应用程序中,针对精心构造的正则表达式模式进行匹配可能允许远程代码执行。我们已知悉一些 PoC,证明该缺陷可能导致以攻击者可控的方式破坏内存。
GHSA-3p8q-wmhx-vm2w: Heap buffer overflow in regular expression compilation Ruby has an integer overflow in its regular expression engine, which causes a heap-based buffer overflow. Compiling a crafted regular expression pattern may allow remote code execution in applications that compile attacker-controlled patterns. We are aware of PoCs that prove this flaw can be used to trigger RCE in some scenarios.
GHSA-3p8q-wmhx-vm2w:正则表达式编译中的堆缓冲区溢出。Ruby 的正则表达式引擎中存在整数溢出,这会导致基于堆的缓冲区溢出。在编译攻击者控制模式的应用程序中,编译精心构造的正则表达式模式可能允许远程代码执行。我们已知悉一些 PoC,证明该缺陷在某些场景下可被用于触发 RCE。
GHSA-7whj-cfh7-xgm4: Heap buffer overflow in Regexp#to_s Ruby has a heap-based buffer overflow in Regexp#to_s. Converting a crafted regular expression to a string may allow information disclosure or remote code execution in applications that compile attacker-controlled patterns. We are aware of PoCs that prove this flaw can be used to trigger RCE in some scenarios.
GHSA-7whj-cfh7-xgm4:Regexp#to_s 中的堆缓冲区溢出。Ruby 的 Regexp#to_s 中存在基于堆的缓冲区溢出。在编译攻击者控制模式的应用程序中,将精心构造的正则表达式转换为字符串可能允许信息泄露或远程代码执行。我们已知悉一些 PoC,证明该缺陷在某些场景下可被用于触发 RCE。
GHSA-pvgc-g7gj-pv6h: Out-of-bounds read in case-insensitive backreference matching Ruby has an out-of-bounds read in its regular expression engine. Matching a crafted string may disclose memory contents or crash the process.
GHSA-pvgc-g7gj-pv6h:不区分大小写的反向引用匹配中的越界读取。Ruby 的正则表达式引擎中存在越界读取漏洞。匹配精心构造的字符串可能会泄露内存内容或导致进程崩溃。
Affected versions Ruby 3.3.13 and earlier Ruby 3.4.0 through 3.4.12 Ruby 4.0.0 through 4.0.9 Recommended action We strongly recommend upgrading to Ruby 4.0.10, 3.4.13 or 3.3.14. Ruby 3.3 is in the security maintenance phase. Ruby 3.2 and earlier have reached their end of life and will not receive these fixes.
受影响版本:Ruby 3.3.13 及更早版本,Ruby 3.4.0 至 3.4.12,Ruby 4.0.0 至 4.0.9。建议操作:我们强烈建议升级到 Ruby 4.0.10、3.4.13 或 3.3.14。Ruby 3.3 正处于安全维护阶段。Ruby 3.2 及更早版本已达到生命周期终点,将不会获得这些修复。
Credits GHSA-34m4-m9fh-gqp5: Stephan Lipp (Ada Logics) and Anthropic GHSA-7x2q-68qv-6p8x: Stephan Lipp (Ada Logics) and Anthropic GHSA-87fm-7w84-j2px: baba__yaga GHSA-wpqw-5qxg-m68r: Stephan Lipp (Ada Logics) and Anthropic GHSA-3p8q-wmhx-vm2w: aphantom GHSA-7whj-cfh7-xgm4: Stephan Lipp (Ada Logics) and Anthropic GHSA-pvgc-g7gj-pv6h: Hiroya Fujinami and Hiroshi SHIBATA History Originally published at 2026-11-19 00:00:00 (UTC)
致谢:GHSA-34m4-m9fh-gqp5:Stephan Lipp (Ada Logics) 和 Anthropic;GHSA-7x2q-68qv-6p8x:Stephan Lipp (Ada Logics) 和 Anthropic;GHSA-87fm-7w84-j2px:baba__yaga;GHSA-wpqw-5qxg-m68r:Stephan Lipp (Ada Logics) 和 Anthropic;GHSA-3p8q-wmhx-vm2w:aphantom;GHSA-7whj-cfh7-xgm4:Stephan Lipp (Ada Logics) 和 Anthropic;GHSA-pvgc-g7gj-pv6h:Hiroya Fujinami 和 Hiroshi SHIBATA。历史记录:最初发布于 2026-11-19 00:00:00 (UTC)。