WordPress PHP Code Injection Vulnerability

by Andreas Dittes on 29. Mai 2006 · 3 comments

Am Wochenende is eine Sicherheitslücke von Wordpress bis v2.02 bekannt geworden. Allerdings muss neben Serverseitigen Einstellungen die Möglichkeit gegeben sein, sich als User zu registrieren. Dies ist auch eine Möglichkeit, die Sicherhetslücke bis zum erscheinen des Patches zu schließen.

Description:
rgod has discovered a vulnerability in WordPress, which can be exploited by malicious users to compromise a vulnerable system.

Input passed to various fields when registering or updating the user profile isn’t properly sanitised before being stored in PHP scripts in the wp-content/cache/userlogins/ and wp-content/cache/users/ directories inside the web root. This can be exploited to inject and execute arbitrary PHP code via the newline character.

It is also possible to supply a spoofed IP address when registering by setting the “PC_REMOTE_ADDR” HTTP header.

The vulnerability has been confirmed in version 2.0.2. Other versions may also be affected.

Solution:
Restrict web access to the wp-content/cache/userlogins/ and wp-content/cache/users/ directories (e.g. with a .htaccess file).

Und hier noch das Script von Retrogod.

{ 3 comments… read them below or add one }

1 Ulli 29. Mai 2006 um 11:27

Also wenn man die Möglichkeit zur Registrierung nich gibt, kann ichs getrost so lassen, wie es bisher war? ;)

2 Andreas Dittes 29. Mai 2006 um 11:32

jo. allerdings sieht es so aus, dass auf den meisten einigermassen sicheren servern es auch so nicht geht. bei den blognutten zum bleistift haben wir das gerade mal getestet. un der eploit is nicht anwendbar.

3 Sotiris 6. Juni 2007 um 01:02

Nice

Leave a Comment

Previous post:

Next post: