CVE-2022-1397: Privilege escalation in easyappointments
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.43618%
CWE
Published
5/11/2022
Updated
2/1/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
alextselegidis/easyappointments | composer | <= 1.4.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper privilege management in the authentication flow. The pre-patch auth() function in Api.php called check_login() to validate credentials but didn't check the returned user's role_slug. This meant any valid user (e.g., 'provider') could masquerade as an admin for API operations. The patch explicitly adds a role_slug === DB_SLUG_ADMIN check, confirming this was the missing security control. The function's location and purpose directly align with the described vulnerability mechanism.