{"id":"GHSA-gp6m-fq6h-cjcx","aliases":["GHSA-gp6m-fq6h-cjcx"],"related":[],"kind":"vulnerability","state":"published","title":"Magento LTS vulnerable to stored XSS in admin file form","summary":"### 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.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2024-02-27T21:47:58.000Z","modified":"2024-11-30T05:27:42.302Z","severity":{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"ecosystem","introduced":"20.0.0","status":"affected","fixed":"20.5.0"}],"ecosystem":"Packagist","package":"openmage/magento-lts","purl":"pkg:composer/openmage/magento-lts","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"19.5.3"}],"ecosystem":"Packagist","package":"openmage/magento-lts","purl":"pkg:composer/openmage/magento-lts","source":"ghsa"}],"references":[{"url":"https://github.com/OpenMage/magento-lts/security/advisories/GHSA-gp6m-fq6h-cjcx","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-20717","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/OpenMage/magento-lts","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gp6m-fq6h-cjcx","url":"https://github.com/advisories/GHSA-gp6m-fq6h-cjcx","licence":"CC-BY-4.0","modified":"2024-11-30T05:27:42.302Z"}],"updatedAt":"2026-11-25T22:56:32.197Z"}