0-day story 1: wp-pro-quiz

Hoan Hp
2 min readJun 8, 2020

--

Summary: I found a quite matter vulnerability in plugin wp-pro-quiz (version≤0.37). It can be downloaded here . Abusing this issue, an unauthenticated attacker can cheat the admin to delete any quiz on vulnerable website

Analyze: CSRF in wp-pro-quiz

Look at this snippet of code at file wp-pro-quiz/lib/controller/WpProQuiz_Controller_Quiz.php

We can see that $_GET[‘id’] is passed directly into deleteAction() which is implemented as below:

After check the user’s permission, $id will be passed into deleteAll(). In here, application will call a SQL query to delete every quiz record having the ID.

So, it’s easy to realize that there is no CSRF-token in entire the flow, a quiz will be removed easily just by one request. We had CSRF here!

Exploit:

URI to request to delete a quiz
URI request to delete a quiz

Conclusion:

CSRF token is important, you should implement it for important tasks

Reference:

https://owasp.org/www-community/attacks/csrf

--

--