CVE-2024-21516: Cross-Site Scripting in OpenCart

opencart/opencart Updated 02 Oct 2025

Summary

22/06/2024
No i
Moderate
4.2

CVE-2024-21516: Cross site scripting in opencart. Affects opencart/opencart versions >= 4.0.0.0. No fix is published. How to fix ↓

Also tracked for

The same CVE-2024-21516 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

OpenCart is an open-source e-commerce platform that allows users to create and manage online stores. It provides various features for product management, order processing, and customer management. The vulnerability affects versions of the package opencart/opencart from 4.0.0.0.

Vulnerability Detail

A reflected XSS issue was identified in the directory parameter of the admin common/filemanager.list route. By tricking a user into clicking on a maliciously crafted URL, an attacker can obtain the user's token. Upon authentication, the payload automatically executes, potentially leading to further exploits if the user has admin privileges. This vulnerability can be exploited if the attacker knows the name or path of the admin directory, which is 'admin' by default.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

To mitigate the risk, it is advised to rename the admin directory to a unique name. This can be done by following the instructions provided in the OpenCart dashboard.

Conclusion

OpenCart versions from 4.0.0.0 are vulnerable to a reflected XSS issue in the admin directory. While a partial fix has been implemented, it is recommended to rename the admin directory to mitigate the risk. Further updates and improvements are required to fully address this vulnerability.

See every vulnerability recorded for opencart/opencart →

Share this vulnerability

FAQ

OpenCart is an open-source e-commerce platform for creating and managing online stores.

Versions of the package opencart/opencart from 4.0.0.0 are affected.

By tricking a user into clicking on a malicious URL, an attacker can obtain the user's token and execute a payload upon authentication.

No, this vulnerability can only be exploited if the attacker knows the name or path of the admin directory, which is 'admin' by default.

No, the fix for this vulnerability is incomplete. The redirect post admin login has been removed, but it is still possible to exploit the issue if the user is already authenticated as an admin.

Related vulnerabilities

Recent vulnerabilities recorded for opencart/opencart.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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