Ruby Releases Fixes for Seven Regex and String Memory Safety Flaws, Five with RCE Proof-of-Concept Exploits

Ruby has patched seven memory-safety vulnerabilities affecting its regular expression engine and string case-conversion functions. Five of the issues include proof-of-concept exploits demonstrating remote code execution potential through crafted input. The project issued fixed releases Ruby 4.0.10, 3.4.13, and 3.3.14 yesterday while noting that older branches including Ruby 3.2 and earlier remain unsupported. Three flaws received critical severity ratings, three high, and one moderate according to the published GitHub security advisories. The vulnerabilities require specific attacker-controlled input paths such as untrusted regex patterns or strings passed to case-conversion routines. Researchers credited include Stephan Lipp of Ada Logics and Anthropic along with several independent contributors. This marks the second set of regex engine fixes within a month following earlier compilation bugs that affected GitLab deployments.

The Hacker NewsTranslated from English

Read at source

Ruby maintainers have released security updates addressing seven memory-safety flaws in the language's regular expression engine and string case-conversion code. Five of these vulnerabilities have associated proof-of-concept exploits that demonstrate remote code execution capabilities when an attacker supplies crafted patterns or strings.

The project published fixed versions Ruby 4.0.10, 3.4.13, and 3.3.14. Affected ranges include Ruby 4.0.0 through 4.0.9, 3.4.0 through 3.4.12, and 3.3.13 and earlier. Ruby 3.2 and older branches reached end-of-life and will not receive patches.

Critical vulnerabilities with RCE PoCs

  • GHSA-34m4-m9fh-gqp5: one-byte heap overflow during case conversion in single-byte encodings such as ISO-8859-1.
  • GHSA-7x2q-68qv-6p8x: double free triggered by compiling a crafted regular expression using character-class intersection (&&).
  • GHSA-3p8q-wmhx-vm2w: heap overflow when compiled regular expression size overflows during compilation.

Three additional high-severity issues also carry remote code execution proof-of-concept code, while one high-severity flaw enables attacker-controlled memory corruption and one moderate out-of-bounds read may disclose memory contents or crash the process.

Applications become exposed when they compile regular expressions built from untrusted input or perform case conversion on attacker-controlled strings. Matching untrusted text against developer-written patterns generally does not trigger the same risk except for the moderate backreference flaw.

The findings were credited to Stephan Lipp of Ada Logics and Anthropic along with baba__yaga, aphantom, Hiroya Fujinami, and Hiroshi SHIBATA. No CVE identifiers have been assigned yet; the GitHub advisory IDs currently serve as the primary tracking mechanism.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in Vulns & Exploits

Microsoft Entra Connect Health Flaw Exploited to Access Tenant Metadata and Admin Emails
GnuPG Warns of Critical Double-Free Flaw in GPGME Exposing App Data to Malicious OpenPGP Keys
CISA Adds Four Critical Flaws in Apache Roller, Cisco Expressway, SAP NetWeaver, and VMware vCenter to Known Exploited Vulnerabilities Catalog