[25577] in bugtraq
Cross Site Scripting Vulnerability in phpBB2's [IMG] tag and remote
daemon@ATHENA.MIT.EDU (Martijn Boerwinkel)
Mon May 27 17:11:25 2002
From: Martijn Boerwinkel <xim@xs4all.nl>
To: bugtraq@securityfocus.com
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature";
boundary="=-Vbg93Fq0f/lA4OnJQ9/6"
Date: 26 May 2002 17:59:33 +0200
Message-Id: <1022428779.1365.58.camel@MEMO1>
Mime-Version: 1.0
--=-Vbg93Fq0f/lA4OnJQ9/6
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
phpBB2 Cross Site Scripting Vulnerability=20
--------------------------------------------=20
Affected Program: phpBB2 version 2.0.0=20
(possibly earlier versions too, but not tested)=20
Vendor: http://www.phpbb.com=20
Vendor Status: informed on 24/04/2002, fixed issued on 20/05/2002=20
Discovery Date: 24/04/2002=20
Release Date: 26/05/2002=20
Vulnerability Class: Cross Site Scripting=20
Severity=20
--------=20
Malicious users can steal other user's and admin's cookies, allowing
them to impersonate other users on the board and access to the
administration panel.=20
Problem=20
-------=20
The problem is very similar to SQL injection.=20
phpBB2 uses a user provided string (through the [IMG] tag)=20
in the following HTML tag:=20
<img src=3D"$user_provided" border=3D"0" />=20
While there is a check to force the string to begin with "http://" it
doesn't disallow ". That means a malicious user can escape the src=3D"" in
the HTML tag and insert his own html code.=20
This same problem also exists in the remote avatar part of the user
profile.=20
Example=20
-------=20
Enter the following anywhere in a message:=20
[img]http://a.a/a"onerror=3D"javascript:alert(document.cookie)[/img]=20
When reading that message it should popup an alert box with your
cookies.=20
Solutions=20
---------=20
* Upgrade to 2.0.1=20
--=20
XiM=20
(#icerealm on irc.icerealm.net)=20
--=-Vbg93Fq0f/lA4OnJQ9/6
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQA88QZlO42RehcRrwoRAuLFAKDnxTbepyJTPCb2GQyP7jA9koK7WwCdGw1Q
Buz3ukUl+BaHem7vDAkTG60=
=jUDa
-----END PGP SIGNATURE-----
--=-Vbg93Fq0f/lA4OnJQ9/6--