CMS Tree Page View [CSRF, Privilege Escalation]


Plugin implements AJAX action cms_tpv_add_page which calls back the function cms_tpv_add_page. The later does not implement any anti-CSRF controls or security checks.

Leveraging a CSRF attack an attacker could perform a Persistent XSS attack if the victim has administrative rights (see PoC).

The AJAX action is a privileged one so it’s only available for registered users. Even so it doesn’t implement any capabilities checks so it’s available to all users no matter the access level. This could allow any registered user to create arbitrary posts no matter the access level.


CSRF -> Persistent XSS

In this PoC we exploit the $_POST["page_titles"] param to perform a Persistent XSS attack.

Create Arbitrary Posts

In this PoC we use a user with subscriber access to create arbitrary pages. The post_type is user defined so in the same manner we could create any post type.