Squirrelmail 1.4.3a VULNERABILITY

compmind

Verified User
Joined
Apr 24, 2004
Messages
16
SquirrelMail Security Notice
============================

About
-----
SquirrelMail is a standards-based webmail package written in PHP4. It
includes built-in pure PHP support for the IMAP and SMTP protocols,
and all pages render in pure HTML 4.0 (with no JavaScript required)
for maximum compatibility across browsers. It has very few
requirements and is very easy to configure and install. SquirrelMail
has all the functionality you would want from an email client,
including strong MIME support, address books, and folder manipulation.

Details
-------
There is a cross site scripting issue in the decoding of encoded text
in certain headers. SquirrelMail correctly decodes the specially
crafted header, but doesn't sanitize the decoded strings.

Affected
--------
SquirrelMail 1.4.3a and earlier
SquirrelMail 1.5.1-cvs before 23rd October 2004

Resolution
----------
A patch has been published to resolve this issue for the SquirrelMail
1.4.3a branch, and can be downloaded from here:

http://prdownloads.sourceforge.net/squirrelmail/sm143a-xss.diff?download

To apply this patch, copy the sm143a-xss.diff file into the base
SquirrelMail directory, and follow the command:

patch -p0 < sm143a-xss.diff

Those using SquirrelMail 1.5.1-cvs should update using CVS, or use a
copy of the latest snapshot downloadable from the SquirrelMail
website
at:

http://www.squirrelmail.org

Acknowledgements
----------------
Special thanks goes to Joost Pol for notifying us about this issue.

Comments
--------
The SquirrelMail development team work hard with people reporting
security issues in an attempt to resolve issues. We appreciate those
that are willing to dedicate the time to work with us on any issue
they uncover in the SquirrelMail project.

If any further issues are uncovered, a dedicated mail address can be
used to report the issue. The address is [email protected].

--
Jonathan Angliss
([email protected])
 
hmm it didn't patch fine for me.

patch -p0 < sm143a-xss.diff
patching file functions/mime.php
Hunk #1 FAILED at 602.
1 out of 1 hunk FAILED -- saving rejects to file functions/mime.php.rej
 
yep, but it is from nutsmail.com so who knows. That was indeed the problem as I was able to patch a standard version.
 
Last edited:
Try contacting nutsmail.com or if that fails ask for help on

#squirrelmail on irc.freenode.net
 
or you can do it by hand if it hasn't changed much

diff -urN functions/mime.php functions/mime.php
--- functions/mime.php 2004-05-23 19:14:11.000000000 +0300
+++ functions/mime.php 2004-11-03 19:16:50.000000000 +0200
@@ -602,13 +602,22 @@
}
$iLastMatch = $i;
$j = $i;
- $ret .= $res[1];
+ if ($htmlsave) {
+ $ret .= htmlspecialchars($res[1]);
+ } else {
+ $ret .= $res[1];
+ }
$encoding = ucfirst($res[3]);
switch ($encoding)
{
case 'B':
$replace = base64_decode($res[4]);
- $ret .= charset_decode($res[2],$replace);
+ if ($utfencode) {
+ $replace = charset_decode($res[2],$replace);
+ } elseif ($htmlsave) {
+ $replace = htmlspecialchars($replace);
+ }
+ $ret .= $replace;
break;
case 'Q':
$replace = str_replace('_', ' ', $res[4]);

The patch file consists of a diff of the old file between the new one, I think you just gotta look for the same lines that the patch changes and do the changes yourself.
 
Last edited:
Back
Top