TL;DR
Ruby released versions 4.0.10, 3.4.13 and 3.3.14 on November 18, 2026, to fix seven memory safety bugs. Ruby says it knows of working proof-of-concept exploits that turn some of them into Ruby remote code execution. Three flaws are rated critical, and none has a CVE ID yet.
All seven bugs sit in Ruby’s regular expression engine or in string case conversion. Ruby’s advisories mention PoCs for six of them, five of which reach code execution, but Ruby has not released them. No exploitation in the wild has been confirmed.
Why It Matters
PoCs Already Exist
The Ruby security advisory is blunt: “We are aware of PoCs that prove some of them can be used to trigger remote code execution.” As a result, the Ruby team says, “We strongly recommend upgrading.” Ruby has not published the PoCs. Still, their existence shows these bugs are practical, not just theoretical.
A Second Round in a Month
This is the second batch of regex fixes in four weeks. On October 23, Ruby 4.0.9, 3.4.12 and 3.3.13 fixed three bugs in Onigmo, Ruby’s regex engine. According to Lilting’s analysis, those bugs sat behind four GitLab code execution CVEs. So real apps do pass user input into Ruby regex code.
How the Attack Works
Most of the flaws need an app that builds a Ruby regular expression from attacker-controlled text. Search filters, routing rules and validation settings are common examples. The advisories warn about “applications that compile regular expressions from attacker-controlled strings.”
Critical Flaws
- GHSA-3p8q-wmhx-vm2w: the size of a compiled regex program can overflow, so Ruby writes past a heap buffer.
- GHSA-7x2q-68qv-6p8x: a character class intersection can make Ruby free the same buffer twice.
- GHSA-34m4-m9fh-gqp5: changing case in single-byte encodings such as ISO-8859-1 writes one byte too far.
High and Medium Flaws
In addition, GHSA-7whj-cfh7-xgm4 overflows a heap buffer in Regexp#to_s. GHSA-87fm-7w84-j2px hits case conversion when the result exceeds 4 GiB. Meanwhile, GHSA-wpqw-5qxg-m68r is an out-of-bounds read that can still corrupt memory “in an attacker-controlled way.” Finally, GHSA-pvgc-g7gj-pv6h is a medium-severity read that “may disclose memory contents or crash the process.”
Notably, the two case conversion bugs do not need a crafted regex. A crafted string alone can trigger them. That makes the path to Ruby remote code execution wider than regex input alone.
Affected Versions
- Ruby 3.3.13 and earlier
- Ruby 3.4.0 to 3.4.12
- Ruby 4.0.0 to 4.0.9
Patch and Mitigation
Upgrade to Ruby 4.0.10, 3.4.13 or 3.3.14 to close every known Ruby remote code execution path in this batch. The advisories list no workaround. Next, rebuild container images and restart long-running Ruby processes. Also, review code that turns user input into regex patterns, since that path exposes most of these bugs. Where possible, escape user input with Regexp.escape before building a Ruby regular expression.
Support Our Threat Intelligence
Find our vulnerability reports and weekly recaps helpful? Support our work today and unlock a 100% ad-free reading experience!