Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain contributor account credentials or compromise existing account
-
DeliveryCreate/edit page with malicious shortcode attribute
-
ExploitInject XSS payload in 'alg_wc_cog_product_cost' or 'alg_wc_cog_product_profit' shortcode
-
ExecutionVisitor accesses page
-
ImpactMalicious script executes in visitor's browser context
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires authenticated access to WordPress as a contributor or above (PR:L in CVSS). The attacker must be able to create or edit posts/pages containing the vulnerable shortcodes. The shortcodes 'alg_wc_cog_product_cost' and 'alg_wc_cog_product_profit' must be in use on at least one page or post that is viewable by the attack target. No special plugin configuration or non-default settings are required; the vulnerability exists in all installations up to version 4.1.0 by default. The vulnerability does not require user interaction (UI:N), but execution depends on another user accessing a page containing the injected shortcode. Sites with strict access control (few contributors) and sites not using these specific shortcodes have reduced practical exposure. |
| Impact | CVSS 6.4 with AV:N/AC:L/PR:L/S:C/I:L/C:L/A:N indicates moderate risk with network attack vector and low complexity, but the critical limiting factor is PR:L (authenticated as contributor or above). The vulnerability requires prior account compromise or insider threat; it is not remotely exploitable by unauthenticated attackers. The scope change (S:C) means the impact affects resources beyond the vulnerable component, increasing severity relative to confined impacts. However, real-world risk depends on WordPress site user management practices: sites with strict contributor access controls face lower risk than those with permissive user registration. No EPSS score, POC code, or CISA KEV status is provided in the input, so active exploitation prevalence is unknown. The vulnerability is discovered and publicly documented (Wordfence source code links), suggesting that plugin installations are discoverable and exploitation is straightforward for authenticated attackers. Organizations running this plugin should assess contributor/author user populations and role assignments to determine true risk. The CVSS scope change and persistent nature (stored XSS, not reflected) elevate practical risk above the numeric score alone. |
| Exploit ScenarioDerived | A contributor-level user (e.g., an employee with blog publishing access, or a compromised account) creates or edits a WordPress page containing the shortcode '[alg_wc_cog_product_cost data="<img src=x onerror=alert(1)>"]'. When any visitor (including administrators) views the page, the injected JavaScript executes in their browser context, allowing cookie theft, session hijacking, malware injection, or further privilege escalation. Because stored XSS persists, the attack affects every user visiting the page until manually removed. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 13, 2026
Stored cross-site scripting in Cost of Goods: Product Cost & Profit Calculator for WooCommerce plugin (all versions up to 4.1.0) allows authenticated attackers with contributor-level access to inject arbitrary JavaScript via unsanitized shortcode attributes 'alg_wc_cog_product_cost' and 'alg_wc_cog_product_profit', which executes in the browsers of all users viewing the affected pages. The vulnerability requires prior account access but no user interaction for execution, making it a persistent attack vector for privilege escalation or malicious content injection on WordPress sites.
RemediationAI
Upgrade the Cost of Goods plugin to a version newer than 4.1.0 that includes input sanitization and output escaping fixes (version number for patched release not specified in provided data; verify with wpcodefactory or Wordfence advisory). Immediate compensating controls for unpatched sites: restrict contributor-level and above role assignments to trusted administrators only, audit existing contributor and author users to identify inactive or suspicious accounts, and review recent posts/pages containing '[alg_wc_cog_product_cost]' or '[alg_wc_cog_product_profit]' shortcodes for injected scripts. If the plugin cannot be removed, disable use of the vulnerable shortcodes by removing them from all pages and posts, or restrict page editing capabilities to administrators only via role management plugins. Note that these workarounds limit site functionality or usability; plugin update is the recommended path.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability resides in WordPress shortcode processing within the Cost of Goods plugin. Shortcodes are a WordPress feature allowing dynamic content generation via square-bracket syntax; the plugin implements custom shortcodes to display product cost and profit data. The root cause is insufficient input sanitization on shortcode attributes before rendering and insufficient output escaping when those attributes are displayed. This falls under CWE-79 (Improper Neutralization of Input During Web Page Generation - 'Cross-site Scripting'). The affected code paths are in class-alg-wc-cog-products.php (lines 119, 133, and 158 per references), where user-supplied shortcode parameters are directly interpolated into HTML output without proper WordPress escaping functions like esc_attr(), esc_html(), or wp_kses_post(). The CPE string 'cpe:2.3:a:wpcodefactory:cost_of_goods_product_cost_profit_calculator_for_woocommerce:*:*:*:*:*:*:*:*:*' confirms all versions of the plugin are affected.
Know when Cost Of Goods gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
DescriptionCVE.org
The Cost of Goods: Product Cost & Profit Calculator for WooCommerce plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's 'alg_wc_cog_product_cost' and 'alg_wc_cog_product_profit' shortcodes in all versions up to, and including, 4.1.0 due to insufficient input sanitization and output escaping on user supplied attributes. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
EUVD-2026-29898
NVD
CVE.org
EPSS
Vulnrichment
GitHub PoC
Exploit-DB