GHSA-gp6m-fq6h-cjcx: Openmage/magento lts Cross-Site Scripting Vulnerability
MODERATEGHSA-gp6m-fq6h-cjcx is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Openmage/magento lts libraries in the Packagist ecosystem. The issue involves magento lts vulnerable to stored xss in admin file form. Remediation is available by upgrading affected packages to version 20.5.0, 19.5.3.
GHSA-gp6m-fq6h-cjcx at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N).
How to Fix GHSA-gp6m-fq6h-cjcx
To remediate this vulnerability, upgrade all affected Openmage/magento lts dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade openmage/magento-lts to 20.5.0
Upgrade openmage/magento-lts to 19.5.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for openmage/magento-lts
How to Check if You Are Affected
To determine whether your application is affected by GHSA-gp6m-fq6h-cjcx, inspect your project dependencies for Openmage/magento lts:
inspect dependencies for openmage/magento-lts
Analyze the terminal output to locate any version of Openmage/magento lts in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 20.5.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Openmage/magento lts, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-gp6m-fq6h-cjcx Affected Openmage/magento lts Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
openmage/magento-lts
|
Packagist |
≥ 20.0.0
< 20.5.0
|
20.5.0
|
|
openmage/magento-lts
|
Packagist |
< 19.5.3
|
19.5.3
|
References
Frequently Asked Questions
What is GHSA-gp6m-fq6h-cjcx?
Which Openmage/magento lts versions are affected?
What version fixes GHSA-gp6m-fq6h-cjcx?
Is openmage/magento-lts affected?
What is the CVSS score of GHSA-gp6m-fq6h-cjcx?
What CWE is associated with GHSA-gp6m-fq6h-cjcx?
How can I check Packagist dependencies for GHSA-gp6m-fq6h-cjcx?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gp6m-fq6h-cjcx",
"modified" : "2024-03-04T04:29:16Z",
"published" : "2024-02-27T21:47:58Z",
"aliases" : [ ],
"summary" : "Magento LTS vulnerable to stored XSS in admin file form",
"details" : "### Summary\nOpenMage 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.\n\n### Details\n`Mage_Adminhtml_Block_System_Config_Form_Field_File` does not escape filename value in certain situations.\nSame as: https://nvd.nist.gov/vuln/detail/CVE-2024-20717\n\n### PoC\n1. Create empty file with this filename: `<img src=x onerror=alert(1)>.crt`\n2. Go to _System_ > _Configuration_ > _Sales | Payment Methonds_.\n3. Click **Configure** on _PayPal Express Checkout_.\n4. Choose **API Certificate** from dropdown _API Authentication Methods_.\n5. Choose the XSS-file and click **Save Config**.\n6. Profit, alerts \"1\" -> XSS.\n7. Reload, alerts \"1\" -> Stored XSS.\n\n### Impact\nAffects admins that have access to any fileupload field in admin in core or custom implementations.\nMalicious JavaScript may be executed in a victim’s browser when they browse to the page containing the vulnerable field.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "openmage/magento-lts"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "20.0.0"
}, {
"fixed" : "20.5.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "openmage/magento-lts"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "19.5.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/OpenMage/magento-lts/security/advisories/GHSA-gp6m-fq6h-cjcx"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-20717"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/OpenMage/magento-lts"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-27T21:47:58Z",
"nvd_published_at" : null
}
}