[23749] in bugtraq

home help back first fref pref prev next nref lref last post

Re: Pine 4.33 (at least) URL handler allows embedded commands.

daemon@ATHENA.MIT.EDU (Roman Drahtmueller)
Tue Jan 8 11:02:36 2002

Date: Mon, 7 Jan 2002 14:01:05 +0100 (MET)
From: Roman Drahtmueller <draht@suse.de>
To: bugtraq@securityfocus.com
In-Reply-To: <Pine.LNX.4.42.0201061733250.3881-100000@nimue.bos.bindview.com>
Message-ID: <Pine.LNX.4.43.0201071358190.22932-200000@dent.suse.de>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="168455424-1305060506-1010408465=:22932"

--168455424-1305060506-1010408465=:22932
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE

> > Problem:=09=09URL handler allows embedded commands.
> > =09=09=09May allow email viruses of the Outlook kind.
>
> >   http://address/'&/some/program${IFS}with${IFS}arguments&'
>
> Isn't that old news? http://www.securityfocus.com/bid/810
>
> I *can* be wrong, but it looks like it is the same problem...

SuSE pine packages contain a patch that makes pine use environment
variables to pass on the URL to the viewer. The patch is attached - I'm
not sure who made it, but it looks like from Olaf Kirch.

Roman.
--=20
 -                                                                      -
| Roman Drahtm=FCller      <draht@suse.de> // "You don't need eyes to see, =
|
  SuSE GmbH - Security           Phone: //             you need vision!"
| N=FCrnberg, Germany     +49-911-740530 //           Maxi Jazz, Faithless =
|
 -                                                                      -

--168455424-1305060506-1010408465=:22932
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="pine-4.33-security.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.43.0201071401050.22932@dent.suse.de>
Content-Description: 
Content-Disposition: attachment; filename="pine-4.33-security.patch"

LS0tIHBpbmUvbWFpbHZpZXcuYy5vcmlnCVRodSBPY3QgMTIgMjE6MzM6MzIg
MjAwMA0KKysrIHBpbmUvbWFpbHZpZXcuYwlGcmkgT2N0IDI3IDEwOjA0OjU4
IDIwMDANCkBAIC0zNzM4LD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F1
b3RlcyB3aXRoIHNpbmdsZSBxdW90ZXMgKi8NCi0JICAgICAgaWYoZG91Ymxl
X3F1b3RlZCAmJg0KLQkJICh0b29scCA9PSBsZWZ0X2RvdWJsZV9xdW90ZSB8
fCB0b29scCA9PSByaWdodF9kb3VibGVfcXVvdGUpKXsNCi0JCSAgKmNtZHAr
KyA9ICdcJyc7DQotCQkgIHRvb2xwKys7DQotCSAgICAgIH0NCi0JICAgICAg
ZWxzZSBpZighKCpjbWRwKysgPSAqdG9vbHArKykpDQotCQlicmVhazsNCiAJ
ICB9DQorCX0gd2hpbGUgKCp0b29scCk7DQogCQ0KIAltb2RlID0gUElQRV9S
RVNFVCB8IFBJUEVfVVNFUiA7DQogCWlmKHN5c3BpcGUgPSBvcGVuX3N5c3Rl
bV9waXBlKGNtZCwgTlVMTCwgTlVMTCwgbW9kZSwgMCkpew0K
--168455424-1305060506-1010408465=:22932--

home help back first fref pref prev next nref lref last post