CVE-2021-20751: EC-CUBE Cross-site scripting vulnerability

ec-cube/ec-cube Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Moderate
6.1

CVE-2021-20751: EC-CUBE Cross-site scripting vulnerability. Affects ec-cube/ec-cube versions >= 4.0.0, < 4.0.6. Fixed in 4.0.6. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

EC-CUBE is an open-source e-commerce platform developed in PHP. It provides various features for building and managing online stores. The vulnerability affects EC-CUBE versions 4.0.0 to 4.0.5-p1 (EC-CUBE 4 series).

Vulnerability Detail

The vulnerability in EC-CUBE allows a remote attacker to perform a cross-site scripting (XSS) attack. By leading an administrator or a user to a specially crafted page and performing a specific operation, the attacker can inject arbitrary scripts into the application. This can lead to unauthorized access, data theft, or other malicious activities.

How To Fix

Minimum fixed version

4.0.6

This is the first release that contains the fix.

composer require ec-cube/ec-cube:4.0.6

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately possible, a temporary workaround is to implement input validation and output encoding to prevent the execution of malicious scripts. This can be done by using security libraries or frameworks that provide built-in protection against XSS attacks.

Conclusion

The EC-CUBE Cross-site scripting vulnerability (CVE-2021-20751) allows remote attackers to inject arbitrary scripts into EC-CUBE, potentially leading to unauthorized access, data theft, or other malicious activities. It is crucial to upgrade to the latest version of EC-CUBE (4.0.6 or later) to mitigate this vulnerability. Implementing input validation and output encoding can serve as a temporary workaround until the upgrade is performed. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for ec-cube/ec-cube →

Share this vulnerability

FAQ

The vulnerability allows an attacker to inject arbitrary scripts into EC-CUBE, potentially leading to unauthorized access, data theft, or other malicious activities.

EC-CUBE versions 4.0.0 to 4.0.5-p1 (EC-CUBE 4 series) are affected by this vulnerability. Users of these versions should upgrade to the latest version as soon as possible.

At the time of this advisory, there are no known public exploits for this vulnerability. However, it is important to apply the recommended fixes to prevent any potential attacks.

Yes, this vulnerability can be exploited remotely. An attacker can lead an administrator or a user to a specially crafted page and perform a specific operation to inject arbitrary scripts.

Yes, the CVSS score for this vulnerability is 6.1, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for ec-cube/ec-cube.

How To Fix

Minimum fixed version

4.0.6

This is the first release that contains the fix.

composer require ec-cube/ec-cube:4.0.6

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback