WordPress >= 2.9 Failure to Restrict URL Access

1. *Advisory Information*

Title: WordPress >= 2.9 Failure to Restrict URL Access
Date published: 13/02/2010

2. *Vulnerability Information*

Class: Failure to Restrict URL Access
Remotely Exploitable: Yes
Locally Exploitable: Yes

3. *Software Description*

WordPress is a state-of-the-art publishing platform with a
focus on aesthetics, web standards, and usability. WordPress
is both free and priceless at the same time. [0]

4. *Vulnerability Description*

Frequently, the only protection for a URL is that links to that page
are not presented to unauthorized users. Security by obscurity is
not sufficient to protect sensitive functions and data in an application.
Access control checks must be performed before a request to a sensitive
function is granted, which ensures that the user is authorized to access
that function. [1]

5. *Vulnerable packages*

Versions >= 2.9

6. *Non-vulnerable packages*

Versions < 2.9

7. *Vulnerability Overview*

Since version 2.9 a new feature was implemented so that users
were able to retrieve posts that they may have deleted by accident.
This new feature was labelled 'trash'. Any posts that are placed within
the trash are only viewable by authenticated and privileged users.

8. *Technical Description*

When WordPress implemented the new feature they failed to change the
permissions granted when the post is in the trash. This means that
an unauthenticated user cannot see the post, however an authenticated
user can, no matter what privileges they have, even 'subcriber'.

"Subscriber [User Level 0] - Somebody who can read comments/comment/receive news letters, etc." [2]

9. *PoC*


10. *Credits*

Thomas Mackenzie (tmacuk) - http://www.thomasmackenzie.co.uk/
Original finder and tester.

Ryan Dewhurst (ethicalhack3r) - http://www.ryandewhurst.co.uk/
PoC creation and analysis.

Arron Finnon (f1nux) - http://www.finux.co.co.uk/
Helped with documentation.

Matthew Hughes - http://www.matthewhughes.co.uk/
Helped with documentation.

Robin Wood (digininja) - http://www.digininja.org/
Helped identify the vulnerability type.

11. *References*

[0] http://wordpress.org/
[1] http://www.owasp.org/index.php/Top_10_2007-Failure_to_Restrict_URL_Access
[2] http://codex.wordpress.org/Roles_and_Capabilities

UPDATE 13/02/2010 --

WP unofficial patch released:

UPDATE 15/02/2010 --

Wordpress 2.9.2 released which fixes the Failure to Restrict URL Access vulnerability.