Ruby Patches 7 Security Vulnerabilities, Including Buffer Overflow and RCE Flaws

Blog WriterCybersecurity News - Original News Source is cybersecuritynews.com


Ruby maintainers released Ruby 4.0.10, 3.4.13, and 3.3.14 to fix seven security vulnerabilities in the language’s regular expression engine and string case-conversion code.

Several flaws can allow remote code execution (RCE), which means an attacker could run code inside a vulnerable Ruby process. The maintainers said they know of proof-of-concept demonstrations that achieved code execution in some scenarios and urged users to upgrade.

The advisory was published on November 19, 2026, at 00:00 UTC. At publication, the Ruby team had requested CVE numbers. However, none had been assigned, so the flaws are tracked by their GitHub Security Advisory IDs.

The advisory describes research demonstrations, not confirmed attacks against production systems. Two flaws affect the Ruby code used to change text case. The first flaw, GHSA-34m4-m9fh-gqp5, lets Ruby write one byte beyond the memory reserved for its output in some text encodings.

The second, GHSA-87fm-7w84-j2px, starts with an integer overflow, where a calculation exceeds the range it can store. That error leads to a write outside the intended memory area. Ruby says both flaws can allow code execution in some scenarios.

Ruby Patches Security Vulnerabilities

Five flaws affect regular expressions, often called regexes, which applications use to search or validate text. The double-free flaw, GHSA-7x2q-68qv-6p8x, causes Ruby to release the same memory block twice while compiling a pattern.

A separate flaw, GHSA-3p8q-wmhx-vm2w, causes a buffer overflow during compilation. Ruby says both can lead to code execution when an application compiles patterns supplied by an attacker.

Another buffer overflow, GHSA-7whj-cfh7-xgm4, occurs when Regexp#to_s converts a regular expression to text. Ruby says the flaw can expose information or allow code execution.

GHSA-wpqw-5qxg-m68r involves a read beyond the intended memory area during case-insensitive matching. Ruby reports that a demonstration showed attacker-controlled memory corruption for this flaw, but does not say it demonstrated code execution.

The final flaw, GHSA-pvgc-g7gj-pv6h, can expose memory contents or crash the process during case-insensitive matching that reuses text captured earlier in the pattern.

The affected versions are Ruby 3.3.13 and earlier, 3.4.0 through 3.4.12, and 4.0.0 through 4.0.9. Upgrade to 3.3.14, 3.4.13, or 4.0.10, respectively, if you are on one of those maintained branches. Ruby 3.3 is in security maintenance.

GHSA ID Vulnerability Affected Ruby Feature Impact
GHSA-34m4-m9fh-gqp5 Heap buffer overflow String case conversion RCE
GHSA-7x2q-68qv-6p8x Double free Regular expression compilation RCE
GHSA-87fm-7w84-j2px Integer overflow String case conversion RCE
GHSA-wpqw-5qxg-m68r Out-of-bounds read Case-insensitive regex matching Memory corruption
GHSA-3p8q-wmhx-vm2w Integer overflow Regular expression compilation RCE
GHSA-7whj-cfh7-xgm4 Heap buffer overflow Regexp#to_s Information disclosure, RCE
GHSA-pvgc-g7gj-pv6h Out-of-bounds read Case-insensitive backreference matching Memory disclosure or crash

Ruby 3.2 and older branches have reached end of life and will not receive these fixes, so teams still running them need to move to a supported branch.

These patches apply to the Ruby runtime itself, not to a Rails gem. That makes them different from the Rails Active Storage file-read flaw and the later Rails image-upload vulnerability previously covered by Cyber Security News. Updating Rails dependencies alone will not install a fixed Ruby runtime.

Start with internet-facing services that accept user-defined patterns or change the case of incoming text. Check the Ruby version in the environment where each app runs, not just on a developer’s laptop.

After upgrading, rebuild any container images that still bundle an older runtime, redeploy web services and background workers, and verify that the new instances are running a patched version.

Use the review to set patching priorities, not to delay updates elsewhere. The release fixes several distinct bugs, and an application does not need to use every affected feature to be exposed.

Give your SOC the alert context on the latest threats to stop incidents quickly -> Integrate Threat Intel from 16K SOCs

The post Ruby Patches 7 Security Vulnerabilities, Including Buffer Overflow and RCE Flaws appeared first on Cyber Security News.