
Python 3 proof-of-concept for CVE-2026-1277, an unauthenticated open redirect in the WordPress URL Shortify plugin (<=1.12.1) via the redirect_to parameter.
Proof-of-Concept (PoC) exploit for CVE-2026-1277, an unauthenticated Open Redirect vulnerability in the WordPress plugin URL Shortify (versions <= 1.12.1) via the
redirect_toparameter.
CVE-2026-1277 is a medium-severity Open Redirect vulnerability affecting the WordPress plugin URL Shortify in versions up to and including 1.12.1. The plugin fails to validate the redirect_to parameter in its promotional dismissal handler, allowing unauthenticated attackers to redirect users to arbitrary external URLs via a crafted link .
This repository contains a Python 3 PoC that:
⚠️ This vulnerability requires user interaction. The victim must click a crafted link. No server compromise occurs.
| Field | Value |
|---|---|
| CVE ID | CVE-2026-1277 |
| Vulnerability Type | Open Redirect (Unauthenticated) |
| CWE | CWE-601: URL Redirection to Untrusted Site |
| CVSS v3.1 Score | 4.7 (Medium) |
| CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N |
| Attack Vector | Network |
| Privileges Required | None (unauthenticated) |
| User Interaction | Required (victim must click link) |
| Impact | Confidentiality: None · Integrity: Low · Availability: None |
| Affected Component | redirect_to parameter in promotional dismissal handler (Promo.php) |
| Vendor | KaizenCoders |
| Patched Version | 1.12.2 |
AV:N — Exploitable over the networkAC:L — No special conditions requiredPR:N — No authentication neededUI:R — Victim must click a crafted linkS:C — Scope changed (impact crosses trust boundary)C:N/I:L/A:N — No confidentiality impact, limited integrity impact, no availability impact| Plugin | Versions Affected | Fixed In |
|---|---|---|
| URL Shortify – Simple and Easy URL Shortener | <= 1.12.1 | 1.12.2 |
⚠️ Update to version 1.12.2 or later immediately.
The vulnerability exists in the handle_promotions method within the Promo class (url-shortify/lite/includes/Promo.php, lines 62-71). The function extracts the redirect_to parameter from the GET request using esc_url_raw(), but performs no validation on the destination URL before calling wp_redirect() .
esc_url_raw() only sanitizes the URL format—it does not verify that the destination belongs to the same domain or an allow-list. This allows any external URL to pass through.
// Simplified vulnerable logic
$redirect_to = esc_url_raw($_GET['redirect_to']); // Sanitized but NOT validated
wp_redirect($redirect_to); // Redirects to ANY external URL
exit;
The fix in version 1.12.2 introduces two new methods: get_valid_redirect_to() and is_valid_redirect_to(). The patch replaces the direct wp_redirect() call with a conditional check that validates the redirect URL against a whitelist of allowed destinations. If the URL is not in the whitelist, the user is redirected to the plugin's pricing page via wp_safe_redirect() .
The whitelist includes only internal plugin-related URLs such as pricing pages, landing pages, and the developer's official domains.
This is a client-side / social-engineering attack. No server compromise occurs.
Attacker Victim Legitimate WP Site Attacker's Site
│ │ │ │
│ 1. Crafts malicious link │ │ │
│ (admin-ajax.php with │ │ │
│ redirect_to=evil.com) │ │ │
│───────────────────────────>│ │ │
│ │ 2. Clicks link │ │
│ │───────────────────────────>│ │
│ │ GET /wp-admin/ │ │
│ │ admin-ajax.php? │ │
│ │ action=heartbeat& │ │
│ │ redirect_to=evil.com │ │
│ │ │ │
│ │ 3. 302 Redirect │ │
│ │<───────────────────────────│ │
│ │ │ │
│ │ 4. Browser follows redirect │
│ │────────────────────────────────────────────────────>│
│ │ │
│ │ 5. Victim sees attacker's phishing page │
│ │────────────────────────────────────────────────────>│
Key point: If the victim does not click the link, the attack fails entirely.
requests libraryInstall dependencies:
pip install requests
git clone https://github.com/sadaqaty/CVE-2026-1277.git
cd CVE-2026-1277
python3 CVE-2026-1277.py -t <TARGET_URL> [OPTIONS]
| Flag | Long Form | Description |
|---|---|---|
-t | --target | Required. Target WordPress base URL |
--check | — | Run vulnerability check using https://interact.sh |
-r | --redirect | Test redirect to a specific URL |
--generate | — | Generate a phishing link to a URL |
-o | --option | Notice option name: welcome_offer (default) or bfcm_2025_offer |
-k | --insecure | Disable SSL certificate verification |
Quickly check whether a target is vulnerable.
python3 CVE-2026-1277.py -t http://target.com --check
Expected output (vulnerable):
[✓] Open Redirect confirmed!
Option: welcome_offer
Redirects to: https://interact.sh
[!] Target http://target.com is VULNERABLE to CVE-2026-1277