Skip to content

Stored XSS in admin system configs

Moderate
Flyingmana published GHSA-5vrp-638w-p8m2 Jul 28, 2024

Package

composer openmage/magento-lts (Composer)

Affected versions

< 20.10.1

Patched versions

20.10.1

Description

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/will be 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

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Changed
Confidentiality
None
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:L/A:N

CVE ID

CVE-2024-41676

Weaknesses

Credits