Directory traversal vulnerability in WEBrick in Ruby 1.8 before 1.8.5-p115 and 1.8.6-p114, and 1.9 through 1.9.0-1, when running on systems
Directory traversal vulnerability in WEBrick in Ruby 1.8 before 1.8.5-p115 and 1.8.6-p114, and 1.9 through 1.9.0-1, when running on systems that support backslash (\) path separators or case-insensitive file names, allows remote attackers to access arbitrary files via (1) "..%5c" (encoded backslash) sequences or (2) filenames that match patterns in the :NondisclosureName option.
- Published
- Mar 4, 2008
- Updated
- Jun 16, 2026
- EPSS
- 27.8% · 98th percentile
- CWE
- CWE-22
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
28
Monitor
Low priority for now.
- CVSS
- 20 / 40 · 5.0 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 8 / 30 · 27.8%
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| ruby-lang | webrick | cpe:2.3:a:ruby-lang:webrick |
| ruby-lang | ruby | cpe:2.3:a:ruby-lang:ruby |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- fedoraproject fedora7
- fedoraproject fedora8
- ruby-lang webrickall versions
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Red Hat:enterprise_linux:4::as | irb | before 0:1.8.1-7.el4_7.1 | 0:1.8.1-7.el4_7.1 |
| Red Hat:enterprise_linux:4::as | ruby | before 0:1.8.1-7.el4_7.1 | 0:1.8.1-7.el4_7.1 |
| Red Hat:enterprise_linux:4::as | ruby-debuginfo | before 0:1.8.1-7.el4_7.1 | 0:1.8.1-7.el4_7.1 |
| Red Hat:enterprise_linux:4::as | ruby-devel | before 0:1.8.1-7.el4_7.1 | 0:1.8.1-7.el4_7.1 |
| Red Hat:enterprise_linux:4::as | ruby-docs | before 0:1.8.1-7.el4_7.1 | 0:1.8.1-7.el4_7.1 |
| Red Hat:enterprise_linux:4::as | ruby-libs | before 0:1.8.1-7.el4_7.1 | 0:1.8.1-7.el4_7.1 |
| Red Hat:enterprise_linux:4::as | ruby-mode | before 0:1.8.1-7.el4_7.1 | 0:1.8.1-7.el4_7.1 |
| Red Hat:enterprise_linux:4::as | ruby-tcltk | before 0:1.8.1-7.el4_7.1 | 0:1.8.1-7.el4_7.1 |
| Red Hat:enterprise_linux:5::client | ruby-docs | before 0:1.8.5-5.el5_2.5 | 0:1.8.5-5.el5_2.5 |
| Red Hat:enterprise_linux:5::client | ruby-irb | before 0:1.8.5-5.el5_2.5 | 0:1.8.5-5.el5_2.5 |
| Red Hat:enterprise_linux:5::client | ruby-libs | before 0:1.8.5-5.el5_2.5 | 0:1.8.5-5.el5_2.5 |
| Red Hat:enterprise_linux:5::client | ruby-rdoc | before 0:1.8.5-5.el5_2.5 | 0:1.8.5-5.el5_2.5 |
| Red Hat:enterprise_linux:5::client | ruby-ri | before 0:1.8.5-5.el5_2.5 | 0:1.8.5-5.el5_2.5 |
| Red Hat:enterprise_linux:5::client | ruby-tcltk | before 0:1.8.5-5.el5_2.5 | 0:1.8.5-5.el5_2.5 |
| Red Hat:enterprise_linux:5::client_workstation | ruby | before 0:1.8.5-5.el5_2.5 | 0:1.8.5-5.el5_2.5 |
| Red Hat:enterprise_linux:5::client_workstation | ruby-debuginfo | before 0:1.8.5-5.el5_2.5 | 0:1.8.5-5.el5_2.5 |
| Red Hat:enterprise_linux:5::client_workstation | ruby-devel | before 0:1.8.5-5.el5_2.5 | 0:1.8.5-5.el5_2.5 |
| Red Hat:enterprise_linux:5::client_workstation | ruby-mode | before 0:1.8.5-5.el5_2.5 | 0:1.8.5-5.el5_2.5 |
Same product
ruby-lang: all recordsOther highest-scoring records for the same primary product.
- CVE-2009-4492WEBrick 1.3.1 in Ruby 1.8.6 through patchlevel 383, 1.8.7 through patchlevel 248, 1.8.8dev, 1.9.1 through patchlevel 376, and 1.9.2dev write35Monitor
- CVE-2025-6442Ruby WEBrick read_header HTTP Request Smuggling Vulnerability23Monitor
- CVE-2019-11879The WEBrick gem 1.4.2 for Ruby allows directory traversal if the attacker once had local access to create a symlink to a location outside of22Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| red hat:irb | 0:1.8.1-7.el4_7.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:ruby | 0:1.8.1-7.el4_7.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:ruby-debuginfo | 0:1.8.1-7.el4_7.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:ruby-devel | 0:1.8.1-7.el4_7.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:ruby-docs | 0:1.8.1-7.el4_7.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:ruby-irb | 0:1.8.5-5.el5_2.5 · Red Hat:enterprise_linux:5::client | Package registry (OSV) |
| red hat:ruby-libs | 0:1.8.1-7.el4_7.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:ruby-mode | 0:1.8.1-7.el4_7.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:ruby-rdoc | 0:1.8.5-5.el5_2.5 · Red Hat:enterprise_linux:5::client | Package registry (OSV) |
| red hat:ruby-ri | 0:1.8.5-5.el5_2.5 · Red Hat:enterprise_linux:5::client | Package registry (OSV) |
| red hat:ruby-tcltk | 0:1.8.1-7.el4_7.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Exploit-DB entry ×1
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Exploit-DB entry | remote | 2008-03-06 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- Published
- First PoC+1 d
- TodaySep 30, 2026+6784 d
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.
Technical details
Attack conditions
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- P · data can be read
- Integrity
- none
- Availability
- none
- Attack complexity
- Low
- Confidentiality impact
- P
- Integrity impact
- None
- Availability impact
- None
Weakness class (CWE)
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')CVSS vector
AV:N/AC:L/Au:N/C:P/I:N/A:N
nvd-primary
Root cause
A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.
The bug in code
The whole CWE-22 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const file = path.join(ROOT, req.query.name);res.sendFile(file);Fixed
const file = path.resolve(ROOT, req.query.name);if (!file.startsWith(ROOT + path.sep)) { return res.sendStatus(400);}res.sendFile(file);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Path TraversalCAPEC-126likelihood: High · Very High
- Using Slashes and URL Encoding Combined to Bypass Validation LogicCAPEC-64likelihood: High · High
- Manipulating Web Input to File System CallsCAPEC-76likelihood: High · Very High
- Using Escaped Slashes in Alternate EncodingCAPEC-78likelihood: High · High
- Using Slashes in Alternate EncodingCAPEC-79likelihood: High · High
ATT&CK techniques
—
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- lists.apple.com/archives/security-announce/2008//Jun/msg00002.html
- lists.opensuse.org/opensuse-security-announce/2008-08/msg00006.html
- secunia.com/advisories/29232
- secunia.com/advisories/29357
- secunia.com/advisories/29536
- secunia.com/advisories/30802
- secunia.com/advisories/31687
- secunia.com/advisories/32371
- support.apple.com/kb/HT2163
- wiki.rpath.com/Advisories:rPSA-2008-0123
- wiki.rpath.com/wiki/Advisories:rPSA-2008-0123
- www.kb.cert.org/vuls/id/404515
- www.mandriva.com/security/advisories?name=MDVSA-2008:141
- www.mandriva.com/security/advisories?name=MDVSA-2008:142
- www.redhat.com/support/errata/RHSA-2008-0897.html
- www.securityfocus.com/archive/1/489205/100/0/threaded
- www.securityfocus.com/archive/1/489218/100/0/threaded
- www.securityfocus.com/archive/1/490056/100/0/threaded
- www.securityfocus.com/bid/28123
- www.securitytracker.com/id?1019562
Vendor advisories and official records. Exploit/PoC links are deliberately left out.