Strategic Overview
- Status
- Patched in 3.3
- Affected Plugin
- Login as User or Customer — User Switching
- Affected Version
<= 3.2- CVSS
- 9.8Critical
- Weakness type
- CWE-285 · Improper Authorization
- CVE
CVE-2022-4305
At a glance
CVE-2022-4305 is a critical-severity Improper Authorization vulnerability in the Login as User or Customer WordPress plugin, affecting versions <= 3.2. It carries a CVSS score of 9.8 (reachable over the network; low attack complexity; high confidentiality, integrity, availability impact). Exploitation requires no authentication. The issue is fixed in version 3.3; sites on affected versions should update now. Disclosed December 2022, reported by cydave.
Vulnerability Overview
The Login as User or Customer plugin for WordPress is vulnerable to authorization bypass due to improper authorization checks on the loginas_return_admin() function in versions up to, and including, 3.2. This makes it possible for unauthenticated attackers to log in as administrators on the vulnerable site. A similar vulnerability is present in the my_action function which allows subscriber-level users and higher to log in as administrators.
Technical Analysis
The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no privileges on the target site, and no interaction from a victim user. A successful exploit has high impact on confidentiality, integrity, availability — full site compromise territory.
CWE-285: Improper Authorization
Login as User or Customer <= 3.2 carries this weakness at loginas_return_admin(), and reaching it takes a caller who can reach the endpoint. Improper authorization means a permission check exists but does not cover the case being exercised, so a caller who is allowed to do one thing is allowed to do a neighbouring thing as well.
A lower-privileged account performs an action reserved for a higher one, which on a multi-author or membership site means an ordinary user reaching administrative behaviour. For Login as User or Customer the fix is 3.3: builds <= 3.2 are affected, anything from 3.3 onward is not.
Remediation
Update to version 3.3, or a newer patched version
How does WordSec protect against this?
Because it turns on account access, WordSec's login security is the relevant layer: role-based two-factor, captcha and brute-force limits raise the cost of getting the account this needs. None of that substitutes for the fix: Login as User or Customer 3.3 closes this, and updating the plugin is the step that ends it.
- Login Security
- Alerts
External References
Related records
Other vulnerabilities in Login as User or Customer — User Switching
Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C