Ruby 编程语言披露了一项名为“ruby2ßhell”的严重(Critical)安全漏洞,该漏洞允许攻击者在无需身份验证的情况下,通过利用字符串大小写转换过程中的单字节堆溢出,在默认配置的 Ruby Web 框架及自托管软件中实现远程代码执行(RCE)1。这一高危漏洞的根本原因在于 ISO-8859 和 Windows-125x 等编码处理机制存在缺陷:当大写 ß (SS) 被写入两个字节时,缓冲区仅按一个字节进行边界检查,导致输入包含 21 个 ß 字符时发生 1 字节的内存溢出1。
针对此安全问题,官方已发布修复补丁,涵盖 Ruby 3.3.14、3.4.13 以及 4.0.10 版本,并建议用户立即升级以消除风险1。相关 GitHub 安全公告编号为 GHSA-34m4-m9fh-gqp5,据悉概念验证代码(PoC)计划在一周后公开1。
A severe security flaw dubbed "Ruby2ßhell" has been discovered in the Ruby programming language, allowing attackers to execute code remotely without prior authentication 1. The vulnerability stems from a single-byte heap overflow triggered during string case conversion processes 1. Because this flaw affects default configurations of common Ruby web frameworks and self-hosted software, it poses a significant risk to standard deployments 1. The issue is classified as critical severity 1.
The root cause lies in how certain encodings, such as ISO-8859 and Windows-125x, handle the capitalization of the German letter "ß" 1. When converted to uppercase, "ß" expands into two bytes ("SS"), but the buffer boundary check only accounts for one byte 1. This discrepancy results in a one-byte overflow if the input contains 21 instances of the character 1. Security researchers have disclosed the issue alongside official patches released by the Ruby development team 1. Users are strongly advised to upgrade immediately to fixed versions, specifically Ruby 3.3.14, 3.4.13, or 4.0.10 1. A proof-of-concept exploit is scheduled for public release one week after the announcement, under GitHub security advisory ID GHSA-34m4-m9fh-gqp5 1.
评论
还没有评论,欢迎留下第一条。