# GHSA-gp6m-fq6h-cjcx: Magento LTS vulnerable to stored XSS in admin file form

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-02-27T21:47:58.000Z
- Modified: 2024-11-30T05:27:42.302Z
- Weaknesses: CWE-79

## Description

### Summary
OpenMage is affected by a stored Cross-Site Scripting (XSS) vulnerability that could be abused by a low-privileged attacker to inject malicious scripts into vulnerable form fields.

### Details
`Mage_Adminhtml_Block_System_Config_Form_Field_File` does not escape filename value in certain situations.
Same as: https://nvd.nist.gov/vuln/detail/CVE-2024-20717

### PoC
1. Create empty file with this filename: `<img src=x onerror=alert(1)>.crt`
2. Go to _System_ > _Configuration_ > _Sales | Payment Methonds_.
3. Click **Configure** on _PayPal Express Checkout_.
4. Choose **API Certificate** from dropdown _API Authentication Methods_.
5. Choose the XSS-file and click **Save Config**.
6. Profit, alerts "1" -> XSS.
7. Reload, alerts "1" -> Stored XSS.

### Impact
Affects admins that have access to any fileupload field in admin in core or custom implementations.
Malicious JavaScript may be executed in a victim’s browser when they browse to the page containing the vulnerable field.

(As written by GitHub Advisory Database.)

## Affected

- openmage/magento-lts (Packagist): from 20.0.0 before 20.5.0; before 19.5.3

## References

- <https://github.com/OpenMage/magento-lts/security/advisories/GHSA-gp6m-fq6h-cjcx> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-20717> (advisory)
- <https://github.com/OpenMage/magento-lts> (package)

## Sources

- GitHub Advisory Database: [GHSA-gp6m-fq6h-cjcx](https://github.com/advisories/GHSA-gp6m-fq6h-cjcx), CC-BY-4.0, modified 2024-11-30

---

Page: https://cve.day/GHSA-gp6m-fq6h-cjcx · Whole record: https://cve.day/GHSA-gp6m-fq6h-cjcx.json · Rebuilt by cve.day 2026-11-25T22:56:32.197Z
