Bug 435902 (CVE-2008-1145) - CVE-2008-1145 ruby: webrick directory traversal
Summary: CVE-2008-1145 ruby: webrick directory traversal
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2008-1145
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-04 11:24 UTC by Mark J. Cox
Modified: 2019-09-29 12:23 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-01-09 09:41:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Mark J. Cox 2008-03-04 11:24:58 UTC
http://www.ruby-lang.org/en/news/2008/03/03/webrick-file-access-vulnerability/

WEBrick, a standard library of Ruby to implement HTTP servers, has file access
vulnerability.

   1. Systems that accept backslash (\) as a path separator, such as Windows.
   2. Systems that use case insensitive filesystems such as NTFS on Windows, HFS
      on Mac OS X.

Attacker can access private files by sending a url with url encoded backslash
(\). This works only on systems that accept backslash as a path separator.  Or
they could bypass restrictions with case-insensitive filesystems.

Comment 1 Mark J. Cox 2008-03-04 11:26:59 UTC
Note: This is only a security issue if you have a ruby application using WEBrick
to serve content via HTTP from a mounted filesystem that is case insensitive or
accepts \ as a path separator, therefore setting to low security severity.

Comment 2 Tomas Hoger 2008-03-05 16:37:40 UTC
CVE-2008-1145:

Directory traversal vulnerability in WEBrick 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.

Comment 3 Tomas Hoger 2008-03-07 14:29:30 UTC
Advisory from researcher that discovered the flaw:

http://marc.info/?l=bugtraq&m=120482138928670&w=4

Upstream SVN commit:

http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=15676

Fixed upstream in:
1.8.5-p115, 1.8.6-p114

Comment 4 Tomas Hoger 2008-03-07 15:38:41 UTC
This issue does not affect ruby packages as shipped in Red Hat Enterprise Linux
2.1 and 3, as those packages do not include WEBrick component.

Comment 5 Fedora Update System 2008-03-13 07:45:54 UTC
ruby-1.8.6.114-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2008-03-13 07:46:49 UTC
ruby-1.8.6.114-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Red Hat Product Security 2009-01-09 09:41:51 UTC
This issue was addressed in:

Red Hat Enterprise Linux:
  http://rhn.redhat.com/errata/RHSA-2008-0897.html


Note You need to log in before you can comment on or make changes to this bug.