Ruby patches seven memory-safety flaws across supported releases

Ruby has released versions 4.0.10, 3.4.13 and 3.3.14 to address seven memory-safety flaws in its regular-expression engine and string case-conversion code. Maintainers say proof-of-concept exploits demonstrate that five of the issues can be used to trigger remote code execution, although the advisories report no attacks so far.
The seven vulnerabilities have GitHub Security Advisory identifiers rather than CVE numbers. Ruby has requested CVE assignments, but until those are issued, organisations need the GHSA IDs to track the flaws in scanners and software inventories.
Critical regex and string-processing issues
Three vulnerabilities are rated critical. GHSA-34m4-m9fh-gqp5 is a one-byte heap overflow during case conversion of strings in certain single-byte encodings, including ISO-8859-1 and Windows-1252. GHSA-7x2q-68qv-6p8x is a double free when Ruby compiles a crafted regular expression using a character-class intersection, represented by &&. GHSA-3p8q-wmhx-vm2w is a heap overflow caused by an overflow in the size of a compiled regular expression.
Each critical issue has a proof of concept for remote code execution. Two further high-severity heap overflows also have RCE PoCs: GHSA-87fm-7w84-j2px, when case conversion creates an output larger than 4 GiB, and GHSA-7whj-cfh7-xgm4, when a crafted compiled expression is converted back to text through Regexp#to_s. Ruby notes that the size requirement for the former makes it impractical for most requests.
GHSA-wpqw-5qxg-m68r, also rated high, is an out-of-bounds read in case-insensitive matching. Its PoC produces attacker-controlled memory corruption, while remote code execution is considered possible but has not been demonstrated. The moderate GHSA-pvgc-g7gj-pv6h is an out-of-bounds read involving a case-insensitive backreference and a crafted subject string; it may disclose memory or crash the process.
Exposure depends on application input paths
All applications running an affected Ruby interpreter include the vulnerable code, but exploitability depends on how external input reaches it. The regex issues generally require an application to build, compile or execute a regular expression from an attacker-controlled pattern. Matching untrusted text against a developer-authored fixed pattern does not present the same condition, except for the moderate backreference issue.
The two case-conversion issues do not require regex use. Teams should review code paths that apply case conversion to imported or externally supplied strings. Ruby 4.0.0 through 4.0.9, 3.4.0 through 3.4.12, and 3.3.13 and earlier are affected within their respective supported lines. Ruby 3.2 and earlier are end of life and will not receive fixes.
Interpreter updates are required
These fixes are shipped inside Ruby itself, so updating a framework or gem does not replace a vulnerable runtime. The relevant version is the interpreter on application servers, background workers and container images. Businesses should identify those deployed runtimes, upgrade them to a fixed supported release, and restart services or rebuild images so that the new interpreter is actually in use.
Ruby moved the 3.3 line from security maintenance to legacy maintenance with 3.3.14; its support ends at the end of March 2027. The immediate business implication is to treat this as a runtime patching task: prioritise systems that compile externally supplied regex patterns or transform untrusted strings, and plan migration away from unsupported Ruby versions.

