· via dev.to (home feed)
Ruby patches seven regex and string bugs, five with confirmed remote code execution
Ruby 4.0.10, 3.4.13 and 3.3.14 fix seven memory-safety flaws in the Onigmo regex engine and string case conversion, with proof-of-concept remote code execution confirmed for five of them.
Seven flaws, five with working exploits
Ruby has shipped patch releases 4.0.10, 3.4.13 and 3.3.14 that close seven security vulnerabilities in its regular expression engine and its string case-conversion code. According to a security advisory published on 19 November 2026, as summarized by dev.to, the Ruby team holds proof-of-concept exploits demonstrating remote code execution against at least five of the seven bugs. The fixes themselves landed on 18 November 2026.
The issues are tracked under GHSA identifiers rather than CVE numbers. Dev.to reports that Ruby has requested CVEs but that none had been assigned at publication time.
Where the bugs live
Ruby does not implement regular expression support on its own. It relies on Onigmo, a C-language fork of the Oniguruma library, to compile and run every Regexp object. Case operations such as upcase, downcase and capitalize also execute in C, because they depend on conversion tables that vary with each string's encoding.
According to dev.to, all seven flaws sit in those two components, which handle raw bytes under manual memory management. None of them touch the interpreter itself or the garbage collector.
The seven vulnerabilities
The advisory's most-cited issue, GHSA-34m4-m9fh-gqp5, is a single-byte heap overflow triggered while upcasing a manipulated string. The advisory confirms that proof-of-concept code achieves remote code execution from that one out-of-range byte.
GHSA-7x2q-68qv-6p8x is a double free that occurs when compiling a crafted regex pattern. This matters to any application that builds a Regexp from text it does not control — a search box with exposed regex syntax, a validator assembled from configuration, a form filter — since the pattern can free the same memory region twice, opening a path to arbitrary code execution.
The remaining five belong to the same family of memory-handling errors, with public proof-of-concept code available for most of them:
- GHSA-87fm-7w84-j2px: an integer overflow during upcase conversion that ends in a heap overflow
- GHSA-wpqw-5qxg-m68r: an out-of-bounds read during case-insensitive matching
- GHSA-3p8q-wmhx-vm2w: a heap overflow during pattern compilation
- GHSA-7whj-cfh7-xgm4: an overflow when converting a Regexp to a string through Regexp#to_s
- GHSA-pvgc-g7gj-pv6h: an out-of-bounds read while matching backreferences, which can leak memory or hang the process
Who found them
The advisory's credits, noted by dev.to, list four of the seven findings as joint reports from Stephan Lipp of Ada Logics and Anthropic. The article reads Anthropic's co-credit across four separate flaws as a sign that model-assisted discovery may be working alongside traditional fuzzing harnesses. The other three were reported separately by baba__yaga, by aphantom, and by Hiroya Fujinami together with Hiroshi Shibata.
Dev.to also points to a Hacker News thread where the discussion drifted toward a familiar argument: that Ruby's flexible string and encoding handling is a recurring source of trouble whenever a flaw surfaces in that layer.
What to check if you run Ruby in production
The advisory covers Ruby 3.3.13 and earlier, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9. Dev.to recommends running ruby -v in every environment and upgrading with rbenv, rvm or asdf to 4.0.10, 3.4.13 or 3.3.14, depending on your branch.
The highest-risk code is anything that compiles a Regexp from uncontrolled input, so review that first. But the exposure is wider than regex-heavy features: normalizing an email or comparing a username with upcase is common enough that the case-conversion flaws affect nearly any application that processes user input.
Two caveats from the write-up. First, the patch does not fix your own code: if you pass user input to Regexp.new without limits, you still need timeouts or length validation to prevent regex denial of service, a separate problem this advisory does not cover. Second, Ruby 3.2 and earlier have reached end of life and will not receive these patches at all — teams on those versions face a major-branch migration, not a patch bump.
Why it matters
Five of the seven flaws come with demonstrated remote code execution, which makes this an exploitation-ready problem rather than a theoretical one, and the affected operations include everyday string handling that almost every Ruby application performs. The episode also illustrates the cost of C-based core libraries with manual memory management: dev.to notes that implementations such as Rust's regex crate rule out this entire class of bug by construction. Finally, with Anthropic credited on four of the findings, the advisory offers a concrete data point on how AI assistance may already be reshaping vulnerability discovery.
- #ruby
- #security
- #regex
- #memory-safety
- #remote-code-execution