CVE-2024-50463
Executive Summary
CVE-2024-50463 is an open redirect vulnerability in the Sunshine Photo Cart WordPress plugin, affecting versions up to and including 3.2.9. This flaw allows an attacker to craft a malicious URL that, when clicked by a logged-in user, redirects them to an untrusted external site. While the CVSS score is moderate (4.7), the risk is amplified in the WordPress ecosystem due to the plugin's widespread use in e-commerce photography stores. No public exploit code or patch is currently available, making proactive detection and mitigation critical.
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 resides in a WordPress plugin distributed via the official WordPress plugin repository. Since no patch exists, site administrators must consider removing or disabling the plugin until a fix is released. The lack of OSV or GitHub advisory data indicates limited community visibility, increasing supply chain risk for sites relying on this plugin.
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: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – victim must click a crafted link
- Scope: Changed (S:C) – redirect can lead to a different security domain
- Confidentiality Impact: Low (C:L) – potential leakage of referrer headers
- Integrity Impact: Low (I:L) – phishing or malware distribution via redirect
- Availability Impact: None (A:N)
Threat Level: Medium. While the direct impact is limited, the open redirect can be weaponized for phishing campaigns targeting site administrators or customers, leading to credential theft or malware installation.
Deep Dive & Mechanics
The vulnerability exists in the sunshine-photo-cart plugin's URL handling logic. The plugin likely processes a redirect parameter (e.g., ?redirect=http://evil.com) without proper validation, allowing an attacker to specify an arbitrary external URL. When a user clicks a crafted link, the plugin's code performs a redirect to the attacker-controlled domain.
Root Cause: Insufficient sanitization of user-supplied input in the redirect function. The plugin fails to validate that the target URL belongs to the same origin or a whitelisted domain.
Attack Scenario:
- Attacker crafts a URL:
https://victim-site.com/?redirect=http://phishing-site.com - Attacker distributes this link via email, social media, or forum posts.
- Victim, logged into the WordPress site, clicks the link.
- The plugin redirects the victim to
http://phishing-site.com, which may mimic the login page of the victim site. - Victim enters credentials, which are captured by the attacker.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is hypothesized based on common open redirect flaws.
Vulnerable Code (PHP):
<?php
// vulnerable redirect logic
$redirect = $_GET['redirect'];
if (!empty($redirect)) {
wp_redirect($redirect);
exit;
}
?>
Patched Code (Hypothetical):
<?php
// patched redirect logic with whitelist validation
$redirect = $_GET['redirect'];
$allowed_domains = array('example.com', 'www.example.com');
$parsed_url = parse_url($redirect);
if (!empty($redirect) && in_array($parsed_url['host'], $allowed_domains)) {
wp_redirect($redirect);
exit;
}
?>
The patched version validates the redirect URL against a whitelist of allowed domains, preventing arbitrary external redirects.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Target: WordPress site with Sunshine Photo Cart <= 3.2.9
- Attacker machine: Kali Linux with Burp Suite
- Phishing server: Simple HTTP server on port 80
Exploitation Steps:
- Identify the vulnerable parameter (likely
redirectorurl). - Craft a malicious URL:
http://target-site.com/?redirect=http://attacker.com/steal.php - Distribute the link to a victim (e.g., via email).
- When victim clicks, they are redirected to
http://attacker.com/steal.php. - On the attacker server, log the
Refererheader and any cookies sent.
Proof-of-Concept (Python):
import requests
target = "http://target-site.com"
payload = "http://evil.com"
url = f"{target}/?redirect={payload}"
print(f"Send this link to victim: {url}")
Blue Team (Defensive)
Detection Steps:
- Monitor web server logs for unusual
redirectparameters pointing to external domains. - Use WAF rules to block requests with
redirectparameter containing external URLs. - Implement CSP headers to restrict redirect destinations.
WAF Rule (ModSecurity):
SecRule ARGS:redirect "!^https?://(www\.)?example\.com" "id:1001,deny,msg:'Open redirect attempt blocked'"
Indicators of Compromise (IOCs)
- URL Patterns:
?redirect=http://or?redirect=https://followed by an external domain - Referer Headers: Requests to external domains with
Referer: http://target-site.com/?redirect=... - Log Entries: Web server logs showing
GET /?redirect=http://with non-whitelisted domains - File Hashes: No specific file hashes; focus on plugin version
sunshine-photo-cart<= 3.2.9
Detection Engineering
YARA Rule
rule CVE_2024_50463_Open_Redirect {
meta:
description = "Detects open redirect attempts targeting Sunshine Photo Cart plugin"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-50463"
strings:
$redirect_param = /[?&]redirect=https?:\/\// nocase
$plugin_path = "wp-content/plugins/sunshine-photo-cart"
condition:
$redirect_param and $plugin_path
}
Sigma Rule
title: Open Redirect via Sunshine Photo Cart Plugin
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests with redirect parameter pointing to external domains
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains: "?redirect=http"
condition: selection
falsepositives:
- Legitimate redirects to whitelisted domains
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-50463 Open Redirect Attempt"; flow:to_server; content:"?redirect="; http_uri; pcre:"/[?&]redirect=https?:\/\//i"; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a WAF rule to block external redirects.
- Monitor logs for suspicious redirect patterns.
Long-term Fix:
- Apply vendor patch when available.
- Replace the plugin with an alternative if no patch is forthcoming.
- Educate users about phishing risks and to verify URLs before clicking.
Workaround:
Add the following code to the theme's functions.php to block external redirects:
add_action('init', function() {
if (isset($_GET['redirect'])) {
$redirect = $_GET['redirect'];
$allowed_hosts = array($_SERVER['HTTP_HOST']);
$parsed = parse_url($redirect);
if (!in_array($parsed['host'], $allowed_hosts)) {
wp_die('Invalid redirect target.');
}
}
});
Valters IT
Securing Digital Frontiers
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.