The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-6962

CVE-2026-6962: WooCommerce Cost of Goods XSS Vulnerability

CVE-2026-6962 is a stored cross-site scripting flaw in Cost of Goods: Product Cost & Profit Calculator for WooCommerce that allows authenticated attackers to inject malicious scripts. This article covers technical details.

Published: May 17, 2026

CVE-2026-6962 Overview

CVE-2026-6962 is a stored Cross-Site Scripting (XSS) vulnerability [CWE-79] in the Cost of Goods: Product Cost & Profit Calculator for WooCommerce plugin for WordPress. The flaw affects all plugin versions up to and including 4.1.0. It resides in the alg_wc_cog_product_cost and alg_wc_cog_product_profit shortcodes, which fail to sanitize input and escape output for user-supplied attributes. Authenticated users with Contributor-level access or higher can inject arbitrary JavaScript that executes when other users view affected pages.

Critical Impact

Authenticated attackers with low-privileged Contributor accounts can persistently inject JavaScript that executes in visitors' browsers, enabling session theft, redirection, and administrative actions through victim browsers.

Affected Products

  • Cost of Goods: Product Cost & Profit Calculator for WooCommerce plugin for WordPress
  • All versions up to and including 4.1.0
  • WordPress sites using the affected plugin shortcodes

Discovery Timeline

  • 2026-05-13 - CVE-2026-6962 published to NVD
  • 2026-05-13 - Last updated in NVD database

Technical Details for CVE-2026-6962

Vulnerability Analysis

The vulnerability stems from improper handling of shortcode attributes within the Cost of Goods plugin. The plugin registers two shortcodes, alg_wc_cog_product_cost and alg_wc_cog_product_profit, that accept user-supplied attributes and render them into page output. The plugin does not sanitize these attributes on input and does not escape them on output.

When a Contributor-level user embeds a malicious shortcode invocation into a post or page, the supplied attribute values are rendered inline as HTML. Browsers parse the injected payload as part of the page DOM, executing attacker-controlled JavaScript whenever any user views the page.

Because the script executes in the browser context of the viewing user, an attacker can hijack sessions, exfiltrate cookies, perform actions on behalf of administrators, or pivot to additional WordPress accounts. The scope change (S:C) reflects script execution affecting the security context of any visitor, including higher-privileged users.

Root Cause

The root cause is missing input sanitization and output escaping on shortcode attributes processed in class-alg-wc-cog-products.php at lines 119, 133, and 158. Attribute values flow directly from shortcode_atts into rendered HTML without calls to esc_attr, esc_html, or wp_kses to neutralize HTML and JavaScript content.

Attack Vector

Exploitation requires an authenticated WordPress account with at least Contributor-level privileges. The attacker authors a post containing the vulnerable shortcode with attribute values that carry a JavaScript payload. After submission, the payload persists in the post content. Any subsequent visitor, including administrators reviewing pending posts, triggers script execution in their browser session. The attack is network-accessible and requires no user interaction beyond loading the affected page.

The vulnerability is described in the Wordfence Vulnerability Report and the underlying code paths can be reviewed in the WordPress plugin source.

Detection Methods for CVE-2026-6962

Indicators of Compromise

  • Posts or pages containing [alg_wc_cog_product_cost] or [alg_wc_cog_product_profit] shortcodes with attribute values that include HTML tags, <script> blocks, or JavaScript event handlers such as onerror= and onload=.
  • Unexpected outbound browser requests from administrator sessions to attacker-controlled domains after viewing posts authored by Contributor accounts.
  • New or modified post records in wp_posts authored by low-privileged users containing encoded payloads such as javascript:, &#x sequences, or base64 strings within shortcode attributes.

Detection Strategies

  • Scan the WordPress database for shortcode usage referencing the vulnerable shortcodes and inspect attribute values for HTML or script content.
  • Deploy web application firewall (WAF) rules that flag shortcode attribute values containing angle brackets, script, or DOM event handlers.
  • Review WordPress audit logs for Contributor accounts submitting posts that include shortcodes outside expected business patterns.

Monitoring Recommendations

  • Monitor administrator and editor browser sessions for anomalous JavaScript execution, cookie access, or unauthorized API requests to /wp-admin/admin-ajax.php.
  • Alert on creation or modification of WordPress user accounts and role changes immediately following Contributor post submissions.
  • Track plugin version inventory across WordPress deployments to identify hosts still running Cost of Goods versions at or below 4.1.0.

How to Mitigate CVE-2026-6962

Immediate Actions Required

  • Update the Cost of Goods: Product Cost & Profit Calculator for WooCommerce plugin to a version newer than 4.1.0 as published in the vendor changeset.
  • Audit existing post and page content for instances of the vulnerable shortcodes and remove or sanitize attribute values containing HTML or JavaScript.
  • Review Contributor, Author, and Editor accounts for unexpected activity and rotate credentials for accounts showing suspicious post submissions.

Patch Information

The vendor released a fix tracked in the WordPress plugin changeset 3524832 for the cost-of-goods-for-woocommerce repository. Site administrators should apply the patched version through the WordPress plugin updater or by replacing the plugin files manually.

Workarounds

  • Deactivate the Cost of Goods plugin until the patched version is installed if business operations permit.
  • Restrict Contributor-level account provisioning and require Editor or Administrator review before publishing any content containing shortcodes.
  • Deploy a WAF rule that blocks POST requests to /wp-admin/post.php containing the vulnerable shortcode names paired with HTML tag characters in attribute values.
bash
# Example: WP-CLI command to identify posts containing the vulnerable shortcodes
wp db query "SELECT ID, post_author, post_status FROM wp_posts WHERE post_content LIKE '%alg_wc_cog_product_cost%' OR post_content LIKE '%alg_wc_cog_product_profit%';"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechWoocommerce

  • SeverityMEDIUM

  • CVSS Score6.4

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • WordPress Code Snippet

  • WordPress Code Snippet

  • WordPress Code Snippet

  • WordPress Changeset Log

  • Wordfence Vulnerability Report
  • Related CVEs
  • CVE-2026-0703: NextMove Lite WooCommerce Plugin XSS Flaw

  • CVE-2026-24526: WooCommerce Email Inquiry XSS Vulnerability

  • CVE-2026-2838: WooCommerce Enquiry Cart XSS Vulnerability

  • CVE-2025-32674: WooCommerce Excel Import XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English