
The Ruby project has released Ruby 4.0.10, 3.4.13 and 3.3.14 to fix seven vulnerabilities in the interpreter’s regular expression engine and in string case conversion. In its November 18 announcement the maintainers say: “We are aware of PoCs that prove some of them can be used to trigger remote code execution,” and “strongly recommend upgrading.” The announcement describes heap buffer overflows, a double free and out-of-bounds reads, and says CVE identifiers have been requested but not yet assigned, so the flaws are tracked by GitHub advisory ids: GHSA-34m4-m9fh-gqp5, GHSA-7x2q-68qv-6p8x, GHSA-87fm-7w84-j2px, GHSA-wpqw-5qxg-m68r, GHSA-3p8q-wmhx-vm2w, GHSA-7whj-cfh7-xgm4 and GHSA-pvgc-g7gj-pv6h.
The Hacker News, summarising the individual advisories, says five of the seven carry remote-code-execution proofs of concept, rates three critical, three high and one moderate, and adds that the advisories report no attacks so far. Whether an application is exposed depends on whether an attacker can feed crafted regular-expression patterns or strings into the affected code: the announcement describes the regex flaws as reachable in “applications that compile attacker-controlled patterns,” while two of the flaws sit in plain case conversion of a crafted string.
How to check if you’re affected
Affected versions, per the Ruby announcement, are Ruby 3.3.13 and earlier, Ruby 3.4.0 through 3.4.12, and Ruby 4.0.0 through 4.0.9. The fixed releases are Ruby 4.0.10, 3.4.13 and 3.3.14. The announcement says Ruby 3.2 and earlier have reached end of life and will not receive these fixes, so those versions need to move to a supported line.
Because the fix ships in the interpreter, The Hacker News notes that updating an application’s gems or framework does not replace a vulnerable Ruby. In practice that means checking the Ruby version (ruby -v) on application servers, background workers and container images, then rebuilding or restarting them after the update; the last part is our reading of that point rather than a step from the announcement.
Until CVE ids are assigned, scanners and software inventories will need the GHSA ids above. Code that builds regular expressions from user input, or runs case conversion over imported text, is where The Hacker News says to look first. The announcement does not publish the proof-of-concept code.
