Skip to main content
Vulnerability Database/CVE-2026-104479

CVE-2026-104479: Shopclass Stored XSS Vulnerability

CVE-2026-104479 is a stored XSS flaw in Shopclass that lets non-admin users inject malicious scripts into item listings. This post explains its impact, affected versions, and mitigation steps.

Published:

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-104479 Overview

CVE-2026-104479 is a stored cross-site scripting (XSS) vulnerability in Shopclass versions prior to 6.2.0. The flaw allows self-registered non-admin users to inject JavaScript into item listing descriptions when the frontend TinyMCE editor is enabled. The ItemActions.php controller stores submitted descriptions without stripping tags, so attacker-controlled markup executes in the site origin for every visitor who opens the listing. The weakness maps to CWE-79: Improper Neutralization of Input During Web Page Generation.

Critical Impact

Any low-privileged account can plant persistent JavaScript that runs in the browser of every visitor viewing an affected listing, enabling session theft, credential harvesting, and account takeover against administrators.

Affected Products

  • Shopclass (mindstellar/shopclass) versions before 6.2.0
  • Deployments with frontend TinyMCE enabled via osc_tinymce_frontend()
  • Any listing page rendering stored descriptions to visitors

Discovery Timeline

  • 2026-10-03 - CVE-2026-104479 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-104479

Vulnerability Analysis

Shopclass accepts rich-text listing descriptions when the frontend TinyMCE editor is enabled. In the ItemActions.php controller, the application calls Params::getParam('description', false, false) with the XSS filter disabled so that legitimate editor markup survives. However, the result is written directly to persistent storage without passing through an HTML allow-list sanitizer. A low-privileged user who registers an account can submit a listing containing <script> tags or event-handler attributes. The payload is stored verbatim and rendered on the public item page, executing in the site origin for every visitor including authenticated administrators.

Root Cause

The root cause is a missing output-sanitization step on the rich-editor code path. The plain-textarea branch continues to strip tags, but the TinyMCE branch previously bypassed sanitization entirely to preserve legitimate markup. Without an allow-list, arbitrary script content persists in the database and executes on render.

Attack Vector

Exploitation requires network access and a self-registered account with permission to create listings. The attacker publishes a listing whose description contains a scripted payload. Each visitor who opens the listing triggers the stored script, enabling cookie theft, forced actions against the Shopclass admin panel, and defacement.

php
// Vulnerable path (pre-6.2.0) in oc-includes/osclass/classes/actions/ItemActions.php
$aItem['description']  =
    (osc_tinymce_frontend() || (defined('OC_ADMIN') && OC_ADMIN))
        ? Params::getParam('description', false, false)   // XSS filter disabled, no allow-list
        : Params::getParam('description');

Source: GitHub commit c196f70

Detection Methods for CVE-2026-104479

Indicators of Compromise

  • Listing descriptions stored in the Shopclass database containing <script>, onerror=, onload=, or javascript: sequences
  • Unexpected outbound requests from administrator browsers after opening a listing page
  • New or modified admin accounts created shortly after an administrator previewed a user-submitted listing

Detection Strategies

  • Query the oc_t_item_description table for HTML tags and event-handler attributes not emitted by the sanctioned TinyMCE toolbar (bold, italic, underline, bullist, numlist, link)
  • Review web server access logs for repeated requests to /item/new and /item/edit from newly registered accounts
  • Add a Content Security Policy (CSP) violation reporting endpoint and monitor for inline-script violations originating on item detail pages

Monitoring Recommendations

  • Alert on administrative session cookies being transmitted to domains outside the Shopclass site origin
  • Monitor file-integrity changes to oc-includes/osclass/classes/actions/ItemActions.php and theme email templates
  • Track creation of listings whose description length or tag diversity deviates sharply from the baseline

How to Mitigate CVE-2026-104479

Immediate Actions Required

  • Upgrade Shopclass to version 6.2.0 or later, which applies osc_sanitize_html() to rich-text descriptions
  • Audit existing listings for stored script payloads and purge or re-sanitize affected rows before re-enabling frontend TinyMCE
  • Rotate administrator session tokens and credentials if any admin viewed user-submitted listings prior to patching

Patch Information

The fix in commit c196f70906522c9b9172c24f1b42cd0a02357422 wraps the rich-editor branch with osc_sanitize_html(), enforcing an allow-list that matches exactly what the TinyMCE toolbar emits. The patch also narrows the frontend editor plugin and toolbar configuration to remove the code source view from public contexts. See the VulnCheck advisory for ShopClass for the full disclosure.

php
// Patched path in 6.2.0 - oc-includes/osclass/classes/actions/ItemActions.php
$aItem['description']  =
    (osc_tinymce_frontend() || (defined('OC_ADMIN') && OC_ADMIN))
        ? osc_sanitize_html(Params::getParam('description', false, false))
        : Params::getParam('description');

Source: GitHub commit c196f70

Workarounds

  • Disable the frontend TinyMCE editor so Shopclass falls back to the plain-textarea branch, which strips tags via the default Params XSS filter
  • Restrict listing creation to vetted users and require manual admin approval before listings become publicly viewable
  • Deploy a strict Content Security Policy that forbids inline scripts and limits script sources to trusted origins
bash
# Example Content Security Policy header to block inline script execution
Header set Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'self'"

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

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.