CVE-2024-12334

6.1 MEDIUM

📋 TL;DR

This vulnerability allows unauthenticated attackers to inject malicious scripts via URL parameters in the WC Affiliate WordPress plugin. When victims click specially crafted links, attackers can steal session cookies, redirect users, or perform actions on their behalf. All WordPress sites using vulnerable versions of this plugin are affected.

💻 Affected Systems

Products:
  • WC Affiliate – A Complete WooCommerce Affiliate Plugin
Versions: All versions up to and including 2.4
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress with WooCommerce and the WC Affiliate plugin installed and activated.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers steal administrator session cookies, gain full control of WordPress site, install backdoors, deface website, or steal sensitive customer data.

🟠

Likely Case

Attackers steal user session cookies, redirect users to phishing sites, or perform limited actions in the context of logged-in users.

🟢

If Mitigated

Script execution blocked by Content Security Policy or browser XSS filters, resulting in no impact.

🌐 Internet-Facing: HIGH
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Reflected XSS requires user interaction (clicking malicious link) but is trivial to craft and distribute via phishing.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.5

Vendor Advisory: https://plugins.trac.wordpress.org/changeset/3224312/wc-affiliate

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find 'WC Affiliate' plugin. 4. Click 'Update Now' if available. 5. If no update appears, manually download version 2.5+ from WordPress.org and replace plugin files.

🔧 Temporary Workarounds

Disable Plugin

all

Temporarily disable the vulnerable plugin until patched

wp plugin deactivate wc-affiliate

Web Application Firewall Rule

linux

Block malicious XSS payloads in URL parameters

ModSecurity rule: SecRule ARGS "<script" "id:1001,phase:2,deny,status:403,msg:'XSS Attack Detected'"

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) headers to block inline script execution
  • Deploy web application firewall with XSS protection rules

🔍 How to Verify

Check if Vulnerable:

Check plugin version in WordPress admin under Plugins → Installed Plugins. If version is 2.4 or lower, you are vulnerable.

Check Version:

wp plugin get wc-affiliate --field=version

Verify Fix Applied:

After updating, verify plugin version shows 2.5 or higher in WordPress admin panel.

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests with suspicious parameters containing <script>, javascript:, or encoded payloads
  • Multiple 403 errors from WAF blocking XSS attempts

Network Indicators:

  • Unusual traffic patterns from known phishing infrastructure
  • URLs with encoded script tags in parameters

SIEM Query:

source="web_logs" AND (uri="*%3Cscript*" OR uri="*javascript:*" OR uri="*onload=*" OR uri="*onerror=*")

🔗 References

📤 Share & Export