CVE-2024-54255
POC_DETAILS: None
Executive Summary
CVE-2024-54255 is an Open Redirect vulnerability (CWE-601) in the WordPress plugin Login Widget With Shortcode by aviplugins.com, affecting versions up to and including 6.1.2. This flaw allows an unauthenticated attacker to craft a malicious URL that, when clicked by a logged-in WordPress user, redirects them to an untrusted external site. The primary risk is phishing, where the attacker can leverage the trusted domain of the WordPress site to trick users into visiting a malicious page, potentially leading to credential theft or malware installation.
The vulnerability has a CVSS v3.1 score of 4.7 (Medium), with a low attack complexity and no privileges required, but user interaction is necessary. The EPSS score is 0.0%, indicating no active exploitation in the wild at the time of analysis. No public exploit code or Nuclei template is available, but the vulnerability is trivially exploitable via a crafted URL parameter.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a WordPress plugin distributed via the official WordPress Plugin Directory. Users who installed the plugin from the directory are at risk. The vendor (aviplugins.com) has not released a patch as of the latest analysis. Organizations should treat this as a supply chain risk, as the plugin is a third-party component integrated into the WordPress ecosystem.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Base Score: 4.7 (Medium)
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): Required (R) – Victim must click a crafted link.
- Scope (S): Changed (C) – The vulnerable component impacts resources beyond its original scope (the redirect goes to an external site).
- Confidentiality (C): Low (L) – Limited information disclosure possible via phishing.
- Integrity (I): Low (L) – The redirect can lead to a malicious site that may alter user data.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the real-world impact is elevated due to the phishing potential and the widespread use of WordPress. The lack of a patch increases the risk for all sites using the plugin.
Deep Dive & Mechanics
The vulnerability resides in the login-sidebar-widget plugin's handling of redirect parameters. The plugin likely uses a redirect_to or similar URL parameter to send users back to a specific page after login. Due to insufficient validation, an attacker can supply an external URL (e.g., https://evil.com) in this parameter, and the plugin will redirect the user to that site after a successful login or even without authentication.
Attack Flow:
- Attacker crafts a URL:
https://victim-site.com/wp-login.php?redirect_to=https://evil.com - Attacker sends this link to a victim via email, social media, or other channels.
- Victim, trusting the legitimate domain, clicks the link.
- The WordPress login page loads, and after login (or sometimes immediately), the user is redirected to
https://evil.com. - The attacker's site can then harvest credentials, serve malware, or perform further social engineering.
The vulnerability is classified as CWE-601: URL Redirection to Untrusted Site ('Open Redirect'). It is a classic open redirect flaw, often used in phishing campaigns to bypass URL reputation filters.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be in the plugin's main file (e.g., login-sidebar-widget.php). A typical vulnerable pattern would be:
// VULNERABLE CODE (conceptual)
$redirect = $_GET['redirect_to'];
if (!empty($redirect)) {
wp_redirect($redirect);
exit;
}
A patched version would validate the redirect URL against a whitelist of allowed domains or use WordPress's built-in wp_safe_redirect() function, which restricts redirects to the same site:
// PATCHED CODE (conceptual)
$redirect = $_GET['redirect_to'];
if (!empty($redirect) && wp_validate_redirect($redirect, home_url())) {
wp_safe_redirect($redirect);
exit;
}
Until the vendor releases an update, users must apply a virtual patch via a Web Application Firewall (WAF) or disable the plugin.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with the vulnerable plugin installed (version <= 6.1.2).
- A controlled external server (e.g.,
evil.com) to receive the redirect.
Exploitation Steps:
- Identify the vulnerable parameter. Common names include
redirect_to,redirect,url, orreturn. - Craft the exploit URL:
https://victim-site.com/wp-login.php?redirect_to=https://evil.com - Send the link to the victim via a phishing email or social engineering.
- When the victim clicks and logs in (or if already logged in), they are redirected to
evil.com.
Proof of Concept (PoC) Code:
import requests
target = "https://victim-site.com"
evil_url = "https://evil.com"
# Test for open redirect
test_url = f"{target}/wp-login.php?redirect_to={evil_url}"
response = requests.get(test_url, allow_redirects=False)
if response.status_code == 302 and response.headers.get('Location') == evil_url:
print(f"[+] Open redirect confirmed: {test_url}")
else:
print("[-] No open redirect detected.")
Blue Team (Detection & Prevention)
Detection:
- Monitor web server logs for
302redirect responses with externalLocationheaders. - Look for login page requests containing suspicious
redirect_toparameters pointing to external domains. - Use the Sigma rule provided in the Detection Engineering section.
Prevention:
- Immediate: Disable the plugin until a patch is released.
- Virtual Patching: Use a WAF (e.g., ModSecurity, Cloudflare) to block
redirect_toparameters containing external URLs. - User Education: Train users to verify URLs before clicking, even if they appear to be from trusted domains.
Indicators of Compromise (IOCs)
- URL Patterns:
*/wp-login.php?redirect_to=*where the redirect target is an external domain.*/wp-admin/*?redirect_to=*with external domains.
- Network Traffic:
- HTTP 302 responses from the WordPress site with a
Locationheader pointing to an untrusted domain.
- HTTP 302 responses from the WordPress site with a
- Log Entries:
- Apache/Nginx access logs showing
302status codes for login pages withredirect_toparameters.
- Apache/Nginx access logs showing
- File Hashes (Plugin):
- The vulnerable plugin file
login-sidebar-widget.php(version <= 6.1.2) – SHA256:UNKNOWN(not publicly available).
- The vulnerable plugin file
Detection Engineering
YARA Rule
rule CVE_2024_54255_Open_Redirect {
meta:
description = "Detects open redirect attempts targeting Login Widget With Shortcode plugin"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-54255"
strings:
$redirect_param = "redirect_to="
$external_domain = /redirect_to=https?:\/\/[^\/]+\.[a-z]{2,}/
condition:
$redirect_param and $external_domain
}
Sigma Rule
title: Open Redirect via Login Widget With Shortcode
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects HTTP requests with redirect_to parameter pointing to external domains
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'redirect_to='
sc-status: 302
filter:
cs-uri-query|contains:
- 'redirect_to=/'
- 'redirect_to=?'
condition: selection and not filter
falsepositives:
- Legitimate redirects to same-site pages
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-54255 Open Redirect Attempt"; flow:to_server,established; content:"redirect_to="; http_uri; pcre:"/redirect_to=https?:\/\/[^\/]+\.[a-z]{2,}/Ui"; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the "Login Widget With Shortcode" plugin on all WordPress sites until a patched version is released.
- Virtual Patching: Implement a WAF rule to block
redirect_toparameters containing external URLs. Example ModSecurity rule:SecRule ARGS:redirect_to "!^https?://[^/]*yourdomain\.com" "phase:2,deny,status:403,id:1000001,msg:'Open redirect blocked'" - Monitor: Review web server logs for any suspicious redirect activity.
- User Awareness: Educate users about phishing attacks that exploit open redirects.
- Long-term: Remove the plugin entirely if the vendor does not provide a patch. Consider using alternative login widgets that are actively maintained.
Valters IT – Securing your digital frontier.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.