WP Directory Kit Auto-Login Authentication Bypass to Full Site Takeover (CVE-2025-13390)
by Nxploited (Khaled ALenazi) · 2026-07-06
- Severity
- Critical
- CVE
- CVE-2025-13390
- Category
- web
- Affected product
- WP Directory Kit (WordPress plugin)
- Affected versions
- <= 1.4.4
- Disclosed
- 2026-07-06
- Patch status
- unpatched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-06 |
| Last Updated | 2026-07-06 |
| Author / Researcher | Nxploited (Khaled ALenazi) |
| CVE / Advisory | CVE-2025-13390 |
| Category | web |
| Severity | Critical |
| CVSS Score | 10.0 (per NVD) |
| Status | Weaponized |
| Tags | wordpress, wp-directory-kit, authentication-bypass, predictable-token, account-takeover, webshell-upload, python, cwe-287 |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | WP Directory Kit (WordPress plugin) |
| Versions Affected | <= 1.4.4 |
| Language / Platform | Python 3 exploit targeting a PHP/WordPress plugin |
| Authentication Required | No |
| Network Access Required | Yes |
Summary
WP Directory Kit implements a one-click “auto-login” feature via wdk_generate_auto_login_link() that mints a login token from weak, predictable inputs (derived from the target user ID) rather than a cryptographically random secret. Because the token can be reproduced by an attacker for any known/guessed user ID (typically ID 1 = the site administrator), an unauthenticated attacker can request /?auto-login=1&user_id=<id>&token=<predictable> and receive valid wordpress_logged_in_* session cookies for that account. The included PoC automates this across a target list, harvests the resulting admin cookies, then uses them to install a malicious “plugin” ZIP through the standard WordPress plugin-upload flow, dropping a PHP webshell for full remote code execution.
Vulnerability Details
Root Cause
The plugin’s auto-login token generator uses a weak/predictable scheme instead of a secure random nonce tied to a per-user secret. The PoC’s own default-token suggestion illustrates how trivially guessable the scheme is:
| |
Because the real plugin logic that seeds wdk_generate_auto_login_link() is similarly derivable from public/guessable values (user ID), an attacker does not need to intercept or brute-force a secret — they can compute a valid token offline and use it directly against /?auto-login=1.
Attack Vector
- Attacker computes (or brute-forces from a small keyspace) a valid auto-login token for a target
user_id(default:1, the administrator). - Attacker sends
GET /?auto-login=1&user_id=1&token=<token>to the target site; the plugin validates the weak token and setswordpress_logged_in_*session cookies for that user without any credentials. - Using the stolen admin session, the attacker requests a nonce from
/wp-admin/plugin-install.php?tab=uploadand POSTs a plugin ZIP to/wp-admin/update.php?action=upload-plugin. - The ZIP contains a PHP webshell (expected filename
Nx.phpin the PoC) which is installed under/wp-content/plugins/<plugin>/Nx.phpand is immediately reachable and executable via HTTP.
Impact
Unauthenticated full site takeover: arbitrary administrator account impersonation followed by direct remote code execution via webshell upload, i.e. complete compromise of the WordPress installation and underlying web server user.
Environment / Lab Setup
Target: WordPress install with "WP Directory Kit" plugin <= 1.4.4 active
Attacker: Python 3, pip install -r requirements.txt (requests, beautifulsoup4, colorama)
Payload: A ZIP file (default name Nxploited.zip) packaging a WordPress "plugin" whose
entry file is a PHP webshell named Nx.php
Targets: list.txt with one host/URL per line
Proof of Concept
PoC Script
See
CVE-2025-13390.pyin this folder.
| |
Detection & Indicators of Compromise
GET /?auto-login=1&user_id=<n>&token=<hex> HTTP/1.1 <- auth-bypass attempt
GET /wp-admin/plugin-install.php?tab=upload HTTP/1.1 <- nonce harvesting with stolen session
POST /wp-admin/update.php?action=upload-plugin HTTP/1.1 <- plugin ZIP upload
GET /wp-content/plugins/<name>/Nx.php?... <- webshell access
Signs of compromise:
- Unexpected
wordpress_logged_in_*sessions created without a corresponding/wp-login.phpPOST - New/unknown plugin directories under
wp-content/plugins/shortly after anauto-loginrequest - Presence of
Nx.phpor similarly named single-file PHP shells inside plugin directories - Plugin-install activity in
uploads_log.txt-style patterns originating from automation (rapid, scripted User-Agent strings)
Remediation
| Action | Detail |
|---|---|
| Primary fix | Update WP Directory Kit to a version beyond 1.4.4 that replaces the auto-login token scheme with a cryptographically secure, per-user, time-limited nonce |
| Interim mitigation | Disable/remove the auto-login feature if not required; restrict /wp-admin/update.php?action=upload-plugin and plugin-install capabilities; monitor for unauthenticated hits to ?auto-login=1 |
References
Notes
Mirrored from https://github.com/Nxploited/CVE-2025-13390 on 2026-07-06. Templated Nxploited branding/banner throughout the script, but the auto-login token exploitation and plugin-upload webshell chain are functional and specific to this CVE.
| |