Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE
VulnPulse 해설
Ruby2Shell (CVE-2026-132825): a one-byte overflow in Ruby's case conversion, fixed with six regex and string bugs in Ruby 4.0.10, 3.4.13 and 3.3.14
On November 18 the Ruby team shipped releases that fix seven bugs, spread across the regex engine and string case conversion, and said proof-of-concept code shows five of them can reach remote code execution in some setups.
영향을 받는 대상
Ruby 3.3.13 and older, 3.4.0 to 3.4.12, and 4.0.0 to 4.0.9. Researcher Veria Labs says Rails and classic-style Sinatra expose the bug to unauthenticated users in their default setup. Products that bundle Ruby (GitLab, GitHub Enterprise Server, Mastodon and others) need a vendor update. Ruby 3.2 and older are end of life and get no fix.
쉽게 말하면
Picture copying text into boxes sized one letter each, where one particular letter turns into two when written. The extra letter spills into the neighbouring box, and whatever was stored there gets overwritten.
작동 방식
CVE-2026-132825 is a bug where changing the case of a string in a single-byte encoding such as ISO-8859-1 or Windows-1252 writes one byte beyond the end of the output buffer. Veria Labs explains that some characters become two characters when upcased, yet the remaining space is only checked for one. UTF-8 text is handled by separate code and is safe, and the faulty loop dates back to Ruby 2.4.0. The other six bugs are memory-handling flaws in compiling and matching regular expressions and in Regexp#to_s (a double free, integer overflows, out-of-bounds reads and writes); most of them matter for apps that compile or match patterns supplied by an attacker. Ruby's GHSA rates the case-conversion bug Critical, while the CVSS score MITRE put in the CVE record is 7.4 (High). At release time the other six had no CVE numbers yet and were listed by GHSA ID.
공격 흐름
- The attacker looks for an app that takes outside text and changes its case while it is still in a single-byte encoding (Veria Labs lists upcase, swapcase and casecmp? among the reachable methods)
- A crafted string makes the conversion write one byte past the buffer
- If the attacker manages to arrange memory just right, code can run inside the process. A watchTowr analyst told SecurityWeek that pulling this off on real systems is hard
해야 할 일
- Developers and operators who install Ruby themselves: move to 4.0.10, 3.4.13 or 3.3.14 and restart your apps. Ruby 3.2 and older have no fix, so move to a supported series
- Admins using a distro's Ruby package: check your distro's advisory for the fixed build. Debian shipped ruby3.3 3.3.14-0+deb13u1 for trixie on November 20
- Self-managed GitLab admins: upgrade to 19.6.1, 19.5.8 or 19.4.10. Source installs must rebuild the Ruby that runs GitLab with 3.3.14 or 3.4.13 or later. GitLab says its hosted GitLab.com and Dedicated services need no action
- GitHub Enterprise Server admins: 3.22.6 (November 22) says it updated Ruby and added application-level mitigations where an immediate update was not possible, without naming CVE numbers. Read the release notes for your series and upgrade
- Users of other products that bundle Ruby: Veria Labs' table as of November 21 lists fixed releases for Chatwoot, Mastodon, OpenProject and the Discourse base image. Confirm versions in each vendor's notice
- Everyone: Veria Labs plans to release a working exploit against stock Rails on November 25, or later if major vendors still lack a fix. Finish updating before then
아직 밝혀지지 않은 점
- Whether the bugs have been used in real attacks (CISA's assessment added to the CVE record on November 19 says exploitation: none)
- CVE numbers for the remaining six bugs, and whether each is reachable from default setups such as Rails
- The fix status for GitHub Enterprise Server series other than 3.22
- Why Ruby's GHSA (Critical) and MITRE's CVSS (7.4) disagree on severity
출처
- SecurityWeek: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE
- Ruby: Security advisories: multiple vulnerabilities in Regexp and String case conversion
- GitHub: GHSA-34m4-m9fh-gqp5 (ruby/ruby)
- CVE record: CVE-2026-132825
- Veria Labs: Ruby2Shell
- GitLab Critical Patch Release: 19.6.1, 19.5.8, 19.4.10
- GitHub Enterprise Server 3.22 release notes
- Debian: DSA-6644-1 ruby3.3
원문 기사와 공개 정보를 바탕으로 VulnPulse가 자체적으로 정리한 해설입니다. 정확한 내용은 출처를 확인하세요. 업데이트:
원문 공지
Tracked as CVE-2026-132825, the bug is a heap-based buffer overflow that could lead to remote code execution (RCE).
2026. 11. 20. 오후 07:34, SecurityWeek에서 "Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE"을(를) 게시했습니다 (유형: 보안 뉴스). 관련 기술: Ruby. CVE: CVE-2026-132825.