Description
The regular expression engine (regex.c) in Ruby 1.8.5 and earlier, 1.8.6 through 1.8.6-p286, 1.8.7 through 1.8.7-p71, and 1.9 through r18423 allows remote attackers to cause a denial of service (infinite loop and crash) via multiple long requests to a Ruby socket, related to memory allocation failure, and as demonstrated against Webrick.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 4.0 | ruby1.8 | 1.8.5-4etch4 | DSA-1695-1 |
| Debian 4.0 | ruby1.9 | 1.9.0+20060609-1etch4 | DSA-1695-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 5 | ruby +8 | 1.8.5-5.el5_2.5 | RHSA-2008:0897 |
| RHEL 4 | irb +6 | 1.8.1-7.el4_7.1 | RHSA-2008:0897 |
| RHEL 3 | irb +6 | 1.6.8-13.el3 | RHSA-2008:0896 |
| RHEL 2 | irb +5 | 1.6.4-7.el2 | RHSA-2008:0895 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Ruby 1.9 - regex engine Remote Socket Memory Leak EDB-6239 · dos · Aug 13, 2008 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 4
- RHSA-2008:0897 Red Hat Security Advisory: ruby security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2008:0896 Red Hat Security Advisory: ruby security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2008:0895 Red Hat Security Advisory: ruby security update Red Hat Security Advisories (RHSA) · May 19, 2026
- DSA-1695-1 ruby1.8 ruby1.9 - denial of service Debian Security (DSA / DLA) · Mar 9, 2026
References
- 31430 third-party-advisory
- USN-651-1 vendor-advisory
- 33185 third-party-advisory
- DSA-1695 vendor-advisory
- http://support.apple.com/kb/HT3549
- 30682 vdb-entry
- FEDORA-2008-8736 vendor-advisory
- ruby-regex-dos(44688) vdb-entry
- 4158 third-party-advisory
- 35074 third-party-advisory
- http://support.avaya.com/elmodocs2/security/ASA-2008-424.htm
- 1021075 vdb-entry
- APPLE-SA-2009-05-12 vendor-advisory
- RHSA-2008:0895 vendor-advisory
- RHSA-2008:0897 vendor-advisory
- 33398 third-party-advisory
- 32219 third-party-advisory
- 6239 exploit
- TA09-133A third-party-advisory
- ADV-2009-1297 vdb-entry
- USN-691-1 vendor-advisory
- oval:org.mitre.oval:def:9570 vdb-entry signature
- 32371 third-party-advisory
- 32165 third-party-advisory
- 32372 third-party-advisory
- FEDORA-2008-8738 vendor-advisory