Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1ncDZtLWZxNmgtY2pjeM4AA5jQ

Magento LTS vulnerable to stored XSS in admin file form

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.

Permalink: https://github.com/advisories/GHSA-gp6m-fq6h-cjcx
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1ncDZtLWZxNmgtY2pjeM4AA5jQ
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: about 2 months ago
Updated: about 2 months ago


CVSS Score: 5.4
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Identifiers: GHSA-gp6m-fq6h-cjcx
References: Repository: https://github.com/OpenMage/magento-lts
Blast Radius: 8.1

Affected Packages

packagist:openmage/magento-lts
Dependent packages: 21
Dependent repositories: 31
Downloads: 146,815 total
Affected Version Ranges: < 19.5.3, >= 20.0.0, < 20.5.0
Fixed in: 19.5.3, 20.5.0
All affected versions: 19.4.0, 19.4.1, 19.4.2, 19.4.3, 19.4.4, 19.4.5, 19.4.6, 19.4.7, 19.4.8, 19.4.9, 19.4.10, 19.4.11, 19.4.12, 19.4.13, 19.4.14, 19.4.15, 19.4.16, 19.4.17, 19.4.18, 19.4.19, 19.4.20, 19.4.21, 19.4.22, 19.4.23, 19.5.0, 19.5.1, 19.5.2, 20.0.0, 20.0.1, 20.0.2, 20.0.3, 20.0.4, 20.0.5, 20.0.6, 20.0.7, 20.0.8, 20.0.10, 20.0.11, 20.0.12, 20.0.13, 20.0.14, 20.0.15, 20.0.16, 20.0.17, 20.0.18, 20.0.19, 20.0.20, 20.1.0, 20.1.1, 20.2.0, 20.3.0, 20.4.0
All unaffected versions: 19.5.3, 20.5.0, 20.6.0