Bug 37874 - CVE-2005-3352 mod_imap cross-site scripting flaw
Summary: CVE-2005-3352 mod_imap cross-site scripting flaw
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_imap (show other bugs)
Version: 2.2.0
Hardware: All other
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2005-12-12 17:23 UTC by Mark Cox
Modified: 2008-08-01 15:28 UTC (History)
0 users

Patch for apache-1.3 tree (ack fielding, jorton) (1.66 KB, patch)
2005-12-12 17:24 UTC, Mark Cox
Details | Diff
Patch for apache-2.0 tree (ack fielding, jorton) (1.81 KB, patch)
2005-12-12 17:25 UTC, Mark Cox
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Cox 2005-12-12 17:23:25 UTC

A flaw in the imagemap processing module, mod_imap, in versions of Apache httpd
1.3, 2.0 and 2.2 can in some circumstances cause the referer header to be output
without being escaped in HTML.  This could allow an attacker who is able to
influence the referer header the ability to do cross-site scripting attacks
against sites using mod_imap in a vulnerable configuration.


moderate (http://httpd.apache.org/security/impact_levels.html)


This flaw only affects sites using mod_imap with a map file that contains the
"referer" directive.

In order to exploit this flaw the attacker would need to control the  referer
header and therefore would need to entice a victim to visit a URL under the
attackers control.

A sucessful cross-site scripting attack using this flaw would be limited to
certain browsers.  Firefox and Mozilla browsers for example already escape
suspect characters in a URL which blocks this from being exploited.


The attached patch ensures that the referer header in mod_imap is escaped and
therefore cannot be used as part of a cross-site scripting attack.

Where this patch cannot be used, a temporary solution is to remove the "referer"
directive from any map files.


I was able to verify this by constructing a victim site with a vulnerable
mod_imap configuration and by constructing a set of scripts on the attacker
site.  When the attackers site was visited using the Internet Explorer browser
it was able to steal the users private cookies from the victim site.


20051101 CERT notification of flaw to security@apache.org
20051102 ASF verification of flaw
20051103 Assigned CVE-2005-3352 with proposed patches
20051104 Contacted CERT asking for co-ordinated release and reporter info
20051114 No response from CERT, contacted them again suggesting 20051118
20051114 CERT said they would contact reporter
20051212 No further response from CERT or reporter, made public
Comment 1 Mark Cox 2005-12-12 17:24:42 UTC
Created attachment 17199 [details]
Patch for apache-1.3 tree (ack fielding, jorton)
Comment 2 Mark Cox 2005-12-12 17:25:14 UTC
Created attachment 17200 [details]
Patch for apache-2.0 tree (ack fielding, jorton)
Comment 3 Mark Cox 2005-12-12 17:26:33 UTC
VU#299838 JPCERT#94453446 JVN#06045169