Lucene search

K
githubGitHub Advisory DatabaseGHSA-5VRP-638W-P8M2
HistoryJul 29, 2024 - 4:38 p.m.

Magento LTS vulnerable to stored Cross-site Scripting (XSS) in admin system configs

2024-07-2916:38:20
CWE-79
GitHub Advisory Database
github.com
6
cross-site scripting
admin system
image url
javascript injection
patched
access restriction
html filtering
security model

CVSS3

4.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

HIGH

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N

AI Score

6.1

Confidence

High

EPSS

0

Percentile

14.7%

Impact

This XSS vulnerability is about the system configs

  • design/header/welcome
  • design/header/logo_src
  • design/header/logo_src_small
  • design/header/logo_alt

They are intended to enable admins to set a text in the two cases, and to define an image url for the other two cases.
But because of previously missing escaping allowed to input arbitrary html and as a consequence also arbitrary JavaScript.

While this is in most usage scenarios not a relevant issue, some people work with more restrictive roles in the backend. Here the ability to inject JavaScript with these settings would be an unintended and unwanted privilege.

Patches

Has the problem been patched? What versions should users upgrade to?

The problem is patched with Version 20.10.1 or higher.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

Possible mitigations are

  • Restricting access to the System Configs
  • checking templates where these settings are used to apply proper html filtering

For Users relying on this possibility

Some Users might actually rely on the ability to use html there.
You can restore the previous behavior by making use of the new introduced ->getUnescapedValue() method on this escaped elements. Developers should have a look at the newly introduced Mage_Core_Model_Security_HtmlEscapedString

Credit

Credit goes to Aakash Adhikari @justlife4x4 for finding this issue

Affected configurations

Vulners
Node
openmagemagentoRange<20.10.1lts
VendorProductVersionCPE
openmagemagento*cpe:2.3:a:openmage:magento:*:*:*:*:lts:*:*:*

CVSS3

4.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

HIGH

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N

AI Score

6.1

Confidence

High

EPSS

0

Percentile

14.7%

Related for GHSA-5VRP-638W-P8M2