Description
DeletePage action uses insecure validation:
- The form uses POST correctly, but the action does not validate the request method. It should execute only for POST requests, and return a form for GET requests.
- The same ticket is used for the whole wiki and for all actions. An attacker can simply get a ticket from one of the actions that use a ticket, and the destroy the whole wiki using the same ticket.
The code says:
# Require a valid ticket. Make outside attacks harder by # requiring two full HTTP transactions
But the attacker needs only n + 2 (create account, get ticket) requests to delete n pages
Steps to reproduce
This link will work for the next 10 hours, due to ticket lifetime limit.
Component selection
- general
Details
This Wiki and earlyer versions.
Workaround
Disable DeletePage action.
Discussion
The fix is quite simple:
- Add the page name to the ticket
- Add the action name to the ticket
- If request method, is not POST, return the form with an error.
Looks like it could be fixed in ActionBase, without changing concrete actions.
Plan
- Priority: Medium
- Assigned to:
Status: added pagename and action to the ticket, in 1.7: http://hg.moinmo.in/moin/1.7/rev/3318504c5dd5