logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in  RSS Apache Lounge  


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.


Post new topic   Forum Index -> News & Hangout View previous topic :: View next topic
Reply to topic   Topic: Advisory: mod_proxy reverse proxy exposure (CVE-2011-3368)
Author
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6998
Location: Germany, Next to Hamburg

PostPosted: Thu 06 Oct '11 10:17    Post subject: Advisory: mod_proxy reverse proxy exposure (CVE-2011-3368) Reply with quote

Apache HTTP Server Security Advisory
====================================

Title: mod_proxy reverse proxy exposure

CVE: CVE-2011-3368
Date: 20111005
Product: Apache HTTP Server
Versions: httpd 1.3 all versions, httpd 2.x all versions

Description:
============

An exposure was reported affecting the use of Apache HTTP Server in
reverse proxy mode. We would like to thank Context Information
Security Ltd for reporting this issue to us.

When using the RewriteRule or ProxyPassMatch directives to configure a
reverse proxy using a pattern match, it is possible to inadvertently
expose internal servers to remote users who send carefully crafted
requests. The server did not validate that the input to the pattern
match was a valid path string, so a pattern could expand to an
unintended target URL.

For future releases of the Apache HTTP Server, the software will
validate the request URI, correcting this specific vulnerability. The
documentation has been updated to reflect the more general risks with
pattern matching in a reverse proxy configuration.

Details:
========

A configuration like one of the following examples:

RewriteRule (.*)\.(jpg|gif|png) http://images.example.com$1.$2 [P]
ProxyPassMatch (.*)\.(jpg|gif|png) http://images.example.com$1.$2

could result in an exposure of internal servers. A request of the form:

GET @other.example.com/something.png HTTP/1.1

would get translated to a target of:

http://images.example.com [at] other/something.png

This will cause the proxy to connect to the hostname
"other.example.com", as the "images.example.com@" segment would be
treated as user credentials when parsing the URL. This would allow a
remote attacker the ability to proxy to hosts other than those
expected, which could be a security exposure in some circumstances.

The request-URI string in this example,
"@other.example.com/something.png", is not valid according to the HTTP
specification, since it neither an absolute URI
("http://example.com/path") nor an absolute path ("/path"). For
future releases, the server has been patched to reject such requests,
instead returning a "400 Bad Request" error.

Actions:
========

Apache HTTPD users should examine their configuration files to determine
if they have used an insecure configuration for reverse proxying.
Affected users can update their configuration, or apply the patch from:

http://www.apache.org/dist/httpd/patches/apply_to_2.2.21/

For example, the above RewriteRule could be changed to:

RewriteRule /(.*)\.(jpg|gif|png) http://images.example.com/$1.$2 [P]

to ensure the pattern only matches against paths with a leading "/".

From http://www.gossamer-threads.com/lists/apache/announce/403462
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2873
Location: Hilversum, NL, EU

PostPosted: Fri 07 Oct '11 10:00    Post subject: Reply with quote

Addition:

Apache admins should review any mod_rewrite proxy rules asap - http://t.co/iEndx1Xe


Steffen
Back to top
didds



Joined: 05 Jan 2012
Posts: 2

PostPosted: Thu 05 Jan '12 16:16    Post subject: Aopache release version to include reverse proxy patch? Reply with quote

Does anybody know of when (ie version number) apache will be released with built in patch for CVE-2011-3368 (http://seclists.org/fulldisclosure/2011/Oct/232)?

I've tried patching source for 2.2.3 on a CentOS server (redhat derivative) which we are running - but there are multiple libexpat.so issues on just building the source. As the exploit would not affect any reverse proxies we use at the moment we decided we'd wait until the patch was included in a later apache version (which hopefully will also avoid the stupid libexpat.so build errors Smile


cheers

didds
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6998
Location: Germany, Next to Hamburg

PostPosted: Fri 06 Jan '12 16:19    Post subject: Re: Aopache release version to include reverse proxy patch? Reply with quote

didds wrote:
Does anybody know of when (ie version number) apache will be released with built in patch for CVE-2011-3368 (http://seclists.org/fulldisclosure/2011/Oct/232)?


Since the is already a patch http://www.apache.org/dist/httpd/patches/apply_to_2.2.21/CVE-2011-3368.patch I think it will be in 2.2.22.



didds wrote:

I've tried patching source for 2.2.3 on a CentOS server (redhat derivative) which we are running - but there are multiple libexpat.so issues on just building the source. As the exploit would not affect any reverse proxies we use at the moment we decided we'd wait until the patch was included in a later apache version (which hopefully will also avoid the stupid libexpat.so build errors Smile


As you can see in your version number, the Redhat guys often do just a backport to their stable version of apache. I guess that is why there are build errors on your system. Of cause you could build apache complete from the sources from apache.org. On the other hand than apache wouldn't be updated via yum anymore.
Back to top
didds



Joined: 05 Jan 2012
Posts: 2

PostPosted: Fri 06 Jan '12 16:24    Post subject: Reply with quote

Thanks James.

So as 2.2.3 is presumably later than 2.2.22, then the patch is already applied,... but 2.2.3 can't be built from source because of the libexpat.so errors...


So is it a case of waiting for apache to release a "last stable" of > 2.2.1 do you mean ?

cheers

Didds
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6998
Location: Germany, Next to Hamburg

PostPosted: Fri 06 Jan '12 16:30    Post subject: Reply with quote

didds wrote:
Thanks James.

So as 2.2.3 is presumably later than 2.2.22, then the patch is already applied,... but 2.2.3 can't be built from source because of the libexpat.so errors...

Nope, the last number of your 2.2 is a three. And the version I talk about is twentytwo. I hope you agree with me that 22 is greater 3.

didds wrote:

So is it a case of waiting for apache to release a "last stable" of > 2.2.1 do you mean ?


The currentls stable version is 2.2.21 And nope, the redhat guys decided for them selfs that they take the 2.2.3 and maintain that version instead of following each new version of apache.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6998
Location: Germany, Next to Hamburg

PostPosted: Sat 07 Jan '12 17:26    Post subject: Reply with quote

2.2.22 maybe coming the next week. Some rumor on mailing list...
Back to top


Reply to topic   Topic: Advisory: mod_proxy reverse proxy exposure (CVE-2011-3368) View previous topic :: View next topic
Post new topic   Forum Index -> News & Hangout