# CVE-2024-21516: Cross site scripting in opencart

- Severity: Low 2.1 (CVSS:4.0, scored by snyk) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.37%, higher than 32% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-06-22T05:00:05.568Z
- Modified: 2026-09-10T03:50:15.799Z
- Also known as: GHSA-pqhq-77pw-763c, BIT-OPENCART-2024-21516
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: snyk

## Description

This affects versions of the package opencart/opencart from 4.0.0.0 and before 4.1.0.0. A reflected XSS issue was identified in the directory parameter of admin common/filemanager.list route. An attacker could obtain a user's token by tricking the user to click on a maliciously crafted URL. The user is then prompted to login and redirected again upon authentication with the payload automatically executing. If the attacked user has admin privileges, this vulnerability could be used as the start of a chain of exploits like Zip Slip or arbitrary file write vulnerabilities in the admin functionality.

**Notes:**

1) This is only exploitable if the attacker knows the name or path of the admin directory. The name of the directory is "admin" by default but there is a pop-up in the dashboard warning users to rename it.

2) The fix for this vulnerability is incomplete. The redirect is removed so that it is not possible for an attacker to control the redirect post admin login anymore, but it is still possible to exploit this issue in admin if the user is authenticated as an admin already.

(As written by CVE List.)

## Affected

- opencart/opencart: from 4.0.0.0 before 4.1.0.0
- opencart opencart: from 4.0.0.0 before *; from 4.0.0.0
- opencart/opencart (Packagist): from 4.0.0.0
- opencart (Bitnami): from 4.0.0-0

## Every score

- snyk: CVSS:4.0 2.1 Low `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P`
- snyk: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P`
- GitHub: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Bitnami Vulnerability Database: rating Low

## References

- <https://security.snyk.io/vuln/SNYK-PHP-OPENCARTOPENCART-7266576> (exploit, patch, third-party-advisory, web)
- <https://github.com/opencart/opencart/commit/c546199e8f100c1f3797a7a9d3cf4db1887399a2> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-21516> (advisory, web)
- <https://github.com/opencart/opencart> (package)

## Sources

- CVE List: [CVE-2024-21516](https://www.cve.org/CVERecord?id=CVE-2024-21516), CVE Terms of Use, modified 2025-01-14
- GitHub Advisory Database: [GHSA-pqhq-77pw-763c](https://github.com/advisories/GHSA-pqhq-77pw-763c), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-21516](https://nvd.nist.gov/vuln/detail/CVE-2024-21516), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-OPENCART-2024-21516](https://osv.dev/vulnerability/BIT-OPENCART-2024-21516), Apache-2.0, modified 2025-04-14

---

Page: https://cve.day/CVE-2024-21516 · Whole record: https://cve.day/CVE-2024-21516.json · Rebuilt by cve.day 2026-11-25T22:58:42.140Z
