- Ruby's maintainers released 4.0.10, 3.4.13 and 3.3.14 to fix seven flaws in regular expressions and string case conversion. They know of proofs of concept for some.
- The flaws are in the language runtime, not in any one application. The fix is a version upgrade.
- Ruby 3.2 and earlier will not get these fixes. Teams should check which versions run in production and where user input reaches these functions.
The risk sits in plumbing, not in your code
Security reviews often focus on the application a company wrote. This advisory is about something underneath it. Ruby's maintainers have disclosed seven flaws in the language itself. Your developers may have written nothing wrong. The exposure can still be real.
The flaws sit in two routine jobs: matching text against patterns and changing the case of text. Many applications change the case of text that outsiders send them. The pattern flaws matter mainly where users can supply the patterns themselves. That split decides who is most exposed.
What the Ruby team announced
On November 18, the Ruby project published an advisory on seven vulnerabilities. They sit in its regular expression engine and in string case conversion. Three patched releases are out: Ruby 4.0.10, Ruby 3.4.13 and Ruby 3.3.14. The maintainers strongly recommend moving to one of them.
The maintainers say they know of proof-of-concept exploits (PoCs). These show that some flaws can trigger remote code execution. That means an outsider could run their own commands on the affected system. The advisory says this works "in some scenarios". It does not claim every setup is exposed.
The flaws have no CVE numbers yet. The project says it has asked for identifiers, but none are assigned. The advisory uses GitHub Security Advisory (GHSA) identifiers instead. One example is GHSA-7x2q-68qv-6p8x, a double free in regular expression compilation.
How the flaws work
All seven are memory-safety errors. Ruby's core manages memory directly. If it miscounts the space a piece of text needs, it can write past the end of its allocation. That is a buffer overflow.
An integer overflow is one way this happens. A size calculation wraps around and returns a number that is too small.
The seven flaws fall into two groups. The first is case conversion. Two of these flaws, GHSA-34m4-m9fh-gqp5 and GHSA-87fm-7w84-j2px, are heap buffer overflows. The advisory says a crafted string passed to case conversion may allow remote code execution. It sets no condition about attacker-controlled patterns for these two.
The second group is the regular expression flaws. The advisory ties several of them to applications that compile attacker-controlled patterns. These include the double free and the heap overflow in compilation. A double free releases the same memory twice. That can corrupt the program's internal records.
Another flaw, in Regexp#to_s, falls under the same condition. The advisory says it may allow information disclosure or code execution.
One more flaw is GHSA-pvgc-g7gj-pv6h. It is an out-of-bounds read, meaning the code reads memory it should not touch. It occurs when matching text case-insensitively with a backreference. The advisory says a crafted string may expose memory contents or crash the process. That is a smaller outcome. It needs only crafted text, not a crafted pattern.
Who found them
The advisory credits Stephan Lipp of Ada Logics and Anthropic for four of the seven. These are GHSA-34m4-m9fh-gqp5, GHSA-7x2q-68qv-6p8x, GHSA-wpqw-5qxg-m68r and GHSA-7whj-cfh7-xgm4. It credits Hiroya Fujinami and Hiroshi SHIBATA for GHSA-pvgc-g7gj-pv6h. It names no reporter for the other two. It does not say how any flaw was found.
What to ask your team
First, ask which Ruby version runs in production. Include container images, build servers and internal tools, not only the main website.
The advisory puts Ruby 3.3 in its security maintenance phase. Ruby 3.2 and earlier are past end of life, and the project will not patch them. A system on those lines has no fix to apply. It needs an upgrade plan.
Second, ask where outside input meets these functions. Can a user supply a search pattern, a filter rule or a validation expression that the application compiles? That is the condition the advisory sets for most regular expression flaws.
Case conversion needs only a crafted string. So ask whether untrusted text gets lowercased or uppercased anywhere. Usernames, email addresses and imported files are common cases.
Third, ask about tracking. No CVE exists yet. Can your vulnerability scanner and patch reports follow GHSA identifiers? A list that waits for CVE numbers may not show these flaws.
The lesson
When a flaw sits in the runtime, every application built on it inherits the flaw, though how exposed each one is depends on what input reaches it. One upgrade fixes it. But someone must first find every place the runtime runs. The upgrade is the easy part. Knowing where it is needed is harder.
Produced by the WebPulse Newsroom with AI assistance from the original reporting credited below, and checked against that source by our editorial review. How we use AI.
Original reporting: ruby-lang.org.





