Regexp 和 String 大小写转换中的多个漏洞
Multiple vulnerabilities in Regexp and String case conversion

原始链接: https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/

Ruby 发布了 4.0.10、3.4.13 和 3.3.14 版本,以修复正则表达式引擎和字符串大小写转换中的七个漏洞。多个缺陷——包括堆缓冲区溢出、整数溢出、双重释放和越界读取——可能导致远程代码执行、内存损坏、信息泄露或崩溃,尤其在使用攻击者控制的模式或字符串时。受影响的版本包括 Ruby 3.3.13 及更早版本、3.4.0–3.4.12,以及 4.0.0–4.0.9。强烈建议用户升级;Ruby 3.3 处于安全维护阶段,而 3.2 及更早版本已终止支持,不会收到修复。CVE 尚未分配;漏洞通过 GHSA 标识符引用。致谢包括 Stephan Lipp、Anthropic 等。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 Regexp 和 String 大小写转换中的多个漏洞(ruby-lang.org) 11 分 由 runesoerensen 40 分钟前 | 隐藏 | 过去 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

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.

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-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-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-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-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.

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-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.

Affected versions

  • Ruby 3.3.13 and earlier
  • Ruby 3.4.0 through 3.4.12
  • Ruby 4.0.0 through 4.0.9

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.

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)
联系我们 contact @ memedata.com