Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
DoS vulnerability in REXML
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
James Britt  
View profile  
 More options Aug 23 2008, 12:28 pm
Newsgroups: comp.lang.ruby
From: James Britt <james.br...@gmail.com>
Date: Sat, 23 Aug 2008 11:28:41 -0500
Local: Sat, Aug 23 2008 12:28 pm
Subject: Re: [ANN] DoS vulnerability in REXML

Shugo Maeda wrote:
> Hello,

> DoS vulenerabilitiy has been discovered in REXML.
> You can also read this report at the following URL.

> * <URL:http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/>

> = DoS vulnerability in REXML

> There is a DoS vulnerability in the REXML library used by Rails to
> parse incoming XML requests.  

To be clear: This is a Rails issue, not a general REXML issue?

The post suggests that Rails uses a different REXML library  than what
ships with the standard Ruby distro, and mentions no other Ruby
framework (Web or otherwise).

--
James Britt

www.happycamperstudios.com   - Wicked Cool Coding
www.jamesbritt.com           - Playing with Better Toys
www.ruby-doc.org             - Ruby Help & Documentation
www.rubystuff.com            - The Ruby Store for Ruby Stuff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christopher Dicely  
View profile  
 More options Aug 23 2008, 2:00 pm
Newsgroups: comp.lang.ruby
From: Christopher Dicely <cmdic...@gmail.com>
Date: Sat, 23 Aug 2008 13:00:18 -0500
Local: Sat, Aug 23 2008 2:00 pm
Subject: Re: [ANN] DoS vulnerability in REXML

But the versions it lists affected are Ruby versions, not Rails
versions. Since REXML is part of the standard library, and particular
Ruby (not Rails) versions are affected, I think the part of the
description that focuses on the risk to Rails is most likely
misguided, and that its a general REXML, not Rails, problem.

Testing the example file in irb on Ruby 1.8.6 on WinXP, without
loading any rails-related libraries, it seems to grab all the
processor resources it can and just hang (this occurs when you access
the only text node of the root element, not on the initial parse,
because until you do that, REXML doesn't try to expand the entities),
so I think tha clinches that its Ruby, not Rails.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Urabe Shyouhei  
View profile  
 More options Aug 23 2008, 3:21 pm
Newsgroups: comp.lang.ruby
From: Urabe Shyouhei <shyou...@ruby-lang.org>
Date: Sat, 23 Aug 2008 14:21:04 -0500
Local: Sat, Aug 23 2008 3:21 pm
Subject: Re: [ANN] DoS vulnerability in REXML
Want to name someone evil?  I'd vote this is an issue of XML itself.
REXML is just doing what it is asked to do.  The problem is, it's (by
design) unclear how much resources are required to parse an XML
document, until we actually parse that document.

So, in fact this problem can happen without REXML, or even without
Ruby.  If you're using other XML parser, be sure that engine can handle
this issue correctly.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Britt  
View profile  
 More options Aug 23 2008, 5:06 pm
Newsgroups: comp.lang.ruby
From: James Britt <james.br...@gmail.com>
Date: Sat, 23 Aug 2008 16:06:54 -0500
Local: Sat, Aug 23 2008 5:06 pm
Subject: Re: [ANN] DoS vulnerability in REXML

The original post said referred to "the REXML library used by Rails",
not the REXML library included with Ruby's standard distro.

And were this an issue with a standard Ruby lib, and not a customized
Rails version, I would have expected an actual patch for the REXML
source so that all code  using REXML is patched.

> Since REXML is part of the standard library, and particular
> Ruby (not Rails) versions are affected, I think the part of the
> description that focuses on the risk to Rails is most likely
> misguided, and that its a general REXML, not Rails, problem.

> Testing the example file in irb on Ruby 1.8.6 on WinXP, without
> loading any rails-related libraries, it seems to grab all the
> processor resources it can and just hang (this occurs when you access
> the only text node of the root element, not on the initial parse,
> because until you do that, REXML doesn't try to expand the entities),
> so I think tha clinches that its Ruby, not Rails.

Then the original post is misleading in emphasizing Rails.

Lots of people use REXML on the Web outside of Rails, so the effect on
Rails is incidental to the real problem and should have been omitted for
clarity.

--
James Britt

www.happycamperstudios.com   - Wicked Cool Coding
www.jamesbritt.com           - Playing with Better Toys
www.ruby-doc.org             - Ruby Help & Documentation
www.rubystuff.com            - The Ruby Store for Ruby Stuff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Urabe Shyouhei  
View profile  
 More options Aug 23 2008, 7:37 pm
Newsgroups: comp.lang.ruby
From: Urabe Shyouhei <shyou...@ruby-lang.org>
Date: Sat, 23 Aug 2008 18:37:20 -0500
Local: Sat, Aug 23 2008 7:37 pm
Subject: Re: [ANN] DoS vulnerability in REXML

James Britt wrote:
> Then the original post is misleading in emphasizing Rails.

> Lots of people use REXML on the Web outside of Rails, so the effect on
> Rails is incidental to the real problem and should have been omitted
> for clarity.

Incidental yes, but that doesn't mean Rails users must be ignored.
Perhaps web-admins should not omit Rails workarounds, but also add a
note that non-Rails apps can suffer this issue.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Britt  
View profile  
 More options Aug 23 2008, 7:51 pm
Newsgroups: comp.lang.ruby
From: James Britt <james.br...@gmail.com>
Date: Sat, 23 Aug 2008 18:51:43 -0500
Local: Sat, Aug 23 2008 7:51 pm
Subject: Re: [ANN] DoS vulnerability in REXML

Urabe Shyouhei wrote:
> James Britt wrote:
>> Then the original post is misleading in emphasizing Rails.

>> Lots of people use REXML on the Web outside of Rails, so the effect on
>> Rails is incidental to the real problem and should have been omitted
>> for clarity.

> Incidental yes, but that doesn't mean Rails users must be ignored.
> Perhaps web-admins should not omit Rails workarounds, but also add a
> note that non-Rails apps can suffer this issue.

Not ignored, but the report should focus on the risk to any application
using Ruby's standard REXML library, including, but not limited to, Web
applications, such as as Merb, Ramaze, Rails, and others that may be
accepting arbitrary XML from outside source.

--
James Britt

www.happycamperstudios.com   - Wicked Cool Coding
www.jamesbritt.com           - Playing with Better Toys
www.ruby-doc.org             - Ruby Help & Documentation
www.rubystuff.com            - The Ruby Store for Ruby Stuff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregory Brown  
View profile  
 More options Aug 23 2008, 7:52 pm
Newsgroups: comp.lang.ruby
From: Gregory Brown <gregory.t.br...@gmail.com>
Date: Sat, 23 Aug 2008 18:52:50 -0500
Local: Sat, Aug 23 2008 7:52 pm
Subject: Re: [ANN] DoS vulnerability in REXML

On Sat, Aug 23, 2008 at 7:37 PM, Urabe Shyouhei <shyou...@ruby-lang.org> wrote:
> James Britt wrote:
>> Then the original post is misleading in emphasizing Rails.

>> Lots of people use REXML on the Web outside of Rails, so the effect on
>> Rails is incidental to the real problem and should have been omitted
>> for clarity.

> Incidental yes, but that doesn't mean Rails users must be ignored.
> Perhaps web-admins should not omit Rails workarounds, but also add a
> note that non-Rails apps can suffer this issue.

But really, the case is "Any Ruby code parsing user passed XML", which
is in no way limited to Rails.
It's reasonable to say "Hey Rails kids, this means you!", but I think
it's a little misleading to pass it off as a Rails bug with a
monkeypatch rather than a patch against Ruby itself.

-greg

--
Technical Blaag at: http://blog.majesticseacreature.com | Non-tech
stuff at: http://metametta.blogspot.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregory Brown  
View profile  
 More options Aug 23 2008, 7:53 pm
Newsgroups: comp.lang.ruby
From: Gregory Brown <gregory.t.br...@gmail.com>
Date: Sat, 23 Aug 2008 18:53:26 -0500
Local: Sat, Aug 23 2008 7:53 pm
Subject: Re: [ANN] DoS vulnerability in REXML
On Sat, Aug 23, 2008 at 7:56 PM, Gregory Brown
<gregory.t.br...@gmail.com> wrote:

te that non-Rails apps can suffer this issue.

> But really, the case is "Any Ruby code parsing user passed XML",

*with REXML

-greg


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christopher Dicely  
View profile  
 More options Aug 23 2008, 7:58 pm
Newsgroups: comp.lang.ruby
From: Christopher Dicely <cmdic...@gmail.com>
Date: Sat, 23 Aug 2008 18:58:07 -0500
Local: Sat, Aug 23 2008 7:58 pm
Subject: Re: [ANN] DoS vulnerability in REXML

On Sat, Aug 23, 2008 at 4:37 PM, Urabe Shyouhei <shyou...@ruby-lang.org> wrote:
> James Britt wrote:
>> Then the original post is misleading in emphasizing Rails.

>> Lots of people use REXML on the Web outside of Rails, so the effect on
>> Rails is incidental to the real problem and should have been omitted
>> for clarity.

> Incidental yes, but that doesn't mean Rails users must be ignored.
> Perhaps web-admins should not omit Rails workarounds, but also add a
> note that non-Rails apps can suffer this issue.

The notice on the ruby-lang.org includes the general workaround and
the Rails-specific instructions (the monkeypatch is general, there is
a special mechanism for guaranteeing it is included given for Rails.)
The problem with the notice is that it the beginning part that
announces the problem makes it sound like it is in a Rails component,
when it is in the Ruby Standard Library. Instead of this:

---[begin]
There is a DoS vulnerability in the REXML library used by Rails to
parse incoming XML requests. A so-called "XML entity explosion" attack
technique can be used for remotely bringing down (disabling) any
application which parses user-provided XML. Most Rails applications
will be vulnerable to this attack.
---[end]

It should say something like this:

---[begin]
There is a DoS vulnerability in the REXML library included in the Ruby
Standard Library. A so-called "XML entity explosion" attack technique
can be used for remotely bringing down (disabling) any application
which parses user-provided XML using REXML.
---[end]

Any specific notes about systems that rely on REXML (including Rails)
should have followed that accurate description of the nature and
applicability of the problem. (I also question whether its true that
"Most Rails applications will be vulnerable to this attack", is it
really true that the majority of Rails apps consume XML from untrusted
sources?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christopher Dicely  
View profile  
 More options Aug 23 2008, 8:03 pm
Newsgroups: comp.lang.ruby
From: Christopher Dicely <cmdic...@gmail.com>
Date: Sat, 23 Aug 2008 19:03:06 -0500
Local: Sat, Aug 23 2008 8:03 pm
Subject: Re: [ANN] DoS vulnerability in REXML
On Sat, Aug 23, 2008 at 4:52 PM, Gregory Brown

I don't think the monkeypatch has anything to do with Rails vs. Ruby,
since there are general instructions for the monkeypatch followed by
instructions on how to include it in a Rails app.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregory Brown  
View profile  
 More options Aug 23 2008, 8:22 pm
Newsgroups: comp.lang.ruby
From: Gregory Brown <gregory.t.br...@gmail.com>
Date: Sat, 23 Aug 2008 19:22:02 -0500
Local: Sat, Aug 23 2008 8:22 pm
Subject: Re: [ANN] DoS vulnerability in REXML

On Sat, Aug 23, 2008 at 8:03 PM, Christopher Dicely <cmdic...@gmail.com> wrote:
> I don't think the monkeypatch has anything to do with Rails vs. Ruby,
> since there are general instructions for the monkeypatch followed by
> instructions on how to include it in a Rails app.

It has everything to do with Ruby vs. Rails.

If we are talking about a vulnerability in standard Ruby, we should be
able to patch standard Ruby and be done with it, not be required to
use some hackish monkeypatch in every application we write.  Ruby core
does of course, maintain Ruby's standard library (or so we hope.)

-greg

--
Technical Blaag at: http://blog.majesticseacreature.com | Non-tech
stuff at: http://metametta.blogspot.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shugo Maeda  
View profile  
 More options Aug 28 2008, 5:03 am
Newsgroups: comp.lang.ruby
From: Shugo Maeda <shugo.ma...@gmail.com>
Date: Thu, 28 Aug 2008 04:03:05 -0500
Local: Thurs, Aug 28 2008 5:03 am
Subject: Re: DoS vulnerability in REXML
Hi,

I admit that my announcement is misleading.  It was based on the
original
report to secur...@rubyonrails.org.

What do you think of fixing it like this?

---
There is a DoS vulnerability in the REXML library included in the Ruby
Standard Library. A so-called "XML entity explosion" attack technique
can be used for remotely bringing down (disabling) any application
which parses user-provided XML using REXML.

Most Rails applications will be vulnerable because Rails parses
user-provided XML using REXML by default.
---

> Any specific notes about systems that rely onREXML(including Rails)
> should have followed that accurate description of the nature and
> applicability of the problem. (I also question whether its true that
> "Most Rails applications will be vulnerable to this attack", is it
> really true that the majority of Rails apps consume XML from untrusted
> sources?

Yes, it is.

Shugo Maeda


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shugo Maeda  
View profile  
 More options Aug 28 2008, 5:19 am
Newsgroups: comp.lang.ruby
From: Shugo Maeda <shugo.ma...@gmail.com>
Date: Thu, 28 Aug 2008 04:19:21 -0500
Local: Thurs, Aug 28 2008 5:19 am
Subject: Re: DoS vulnerability in REXML
Hi,

"Gregory Brown" <gregory.t.br...@gmail.com> wrote:
> On Sat, Aug 23, 2008 at 8:03 PM, Christopher Dicely <cmdic...@gmail.com> wrote:
> > I don't think the monkeypatch has anything to do with Rails vs. Ruby,
> > since there are general instructions for the monkeypatch followed by
> > instructions on how to include it in a Rails app.

> It has everything to do with Ruby vs. Rails.

> If we are talking about a vulnerability in standard Ruby, we should be
> able to patch standard Ruby and be done with it, not be required to
> use some hackish monkeypatch in every application we write.  Ruby core
> does of course, maintain Ruby's standard library (or so we hope.)

There are some considerations to apply this fix to the Ruby's standard
library.  This vulnerability (not Ruby specific but in general)
had been known for a long time, so we decided to provide a monkey
patch
for a workaround.

We are discussing some considerations on ruby-dev ML, and I'll send
a mail with details to ruby-core ML later.

Shugo Maeda


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregory Brown  
View profile  
 More options Aug 28 2008, 11:00 am
Newsgroups: comp.lang.ruby
From: Gregory Brown <gregory.t.br...@gmail.com>
Date: Thu, 28 Aug 2008 10:00:13 -0500
Local: Thurs, Aug 28 2008 11:00 am
Subject: Re: DoS vulnerability in REXML

Okay, I'll look out for that.  Thanks!

-greg

--
Technical Blaag at: http://blog.majesticseacreature.com | Non-tech
stuff at: http://metametta.blogspot.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shugo Maeda  
View profile  
 More options Aug 29 2008, 5:51 am
Newsgroups: comp.lang.ruby
From: Shugo Maeda <shugo.ma...@gmail.com>
Date: Fri, 29 Aug 2008 04:51:21 -0500
Local: Fri, Aug 29 2008 5:51 am
Subject: Re: DoS vulnerability in REXML
Hello,

Shugo Maeda <shugo.ma...@gmail.com> wrote:
> What do you think of fixing it like this?

> ---
> There is a DoS vulnerability in theREXMLlibrary included in the Ruby
> Standard Library. A so-called "XML entity explosion" attack technique
> can be used for remotely bringing down (disabling) any application
> which parses user-provided XML usingREXML.

> Most Rails applications will be vulnerable because Rails parses
> user-provided XML usingREXMLby default.
> ---

I have fixed the announcement.

  http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/

Thank you.

Shugo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »