GHSA-gp6m-fq6h-cjcx: Openmage/magento lts Cross-Site Scripting Vulnerability

MODERATE
CVSS 5.4
CWE-79
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-gp6m-fq6h-cjcx
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Openmage/magento lts
Package Ecosystem Packagist
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

openmage/magento-lts fixed: 20.5.0
Upgrade openmage/magento-lts to 20.5.0
openmage/magento-lts fixed: 19.5.3
Upgrade openmage/magento-lts to 19.5.3
Verify Direct and Transitive Dependencies

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

### 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.

GHSA-gp6m-fq6h-cjcx Affected Openmage/magento lts Versions

2 component(s)
Fixed Versions:
20.5.019.5.3
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?
GHSA-gp6m-fq6h-cjcx is a security vulnerability in Openmage/magento lts involving Magento LTS vulnerable to stored XSS in admin file form under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Openmage/magento lts versions are affected?
Affected versions include releases prior to 20.5.0, 19.5.3 across affected packages: openmage/magento-lts.
What version fixes GHSA-gp6m-fq6h-cjcx?
Upgrading to 20.5.0, 19.5.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openmage/magento-lts affected?
Yes, openmage/magento-lts is affected in releases prior to 20.5.0, 19.5.3. Upgrade your dependency to 20.5.0, 19.5.3 or later.
What is the CVSS score of GHSA-gp6m-fq6h-cjcx?
GHSA-gp6m-fq6h-cjcx has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with GHSA-gp6m-fq6h-cjcx?
GHSA-gp6m-fq6h-cjcx is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check Packagist dependencies for GHSA-gp6m-fq6h-cjcx?
Run the dependency tree command: 'inspect dependencies for openmage/magento-lts'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}