Skip to content

Cross-site scripting from dynamic options in the multiselect field

Moderate severity GitHub Reviewed Published Aug 24, 2022 in getkirby/kirby • Updated Jan 29, 2023

Package

composer getkirby/cms (Composer)

Affected versions

< 3.5.8.1

Patched versions

3.5.8.1

Description

Introduction

Cross-site scripting (XSS) is a type of vulnerability that allows to execute any kind of JavaScript code inside the Panel session of the same or other users. In the Panel, a harmful script can for example trigger requests to Kirby's API with the permissions of the victim.

Such vulnerabilities are critical if you might have potential attackers in your group of authenticated Panel users. They can escalate their privileges if they get access to the Panel session of an admin user. Depending on your site, other JavaScript-powered attacks are possible.

Impact

The multiselect field allows to select tags from an autocompleted list. Unfortunately, the Panel in Kirby 3.5 used HTML rendering for the raw option value.

This allowed attackers with influence on the options source (e.g. content of sibling pages or an API endpoint) to inject HTML code. If a page in the Panel that uses the manipulated multiselect options was visited by a victim and the victim opened the autocomplete dropdown, the victim's browser will then have rendered this malicious HTML code.

You are not affected by this vulnerability if you don't use the multiselect field or only use it with options that cannot be manipulated by attackers.

Patches

The problem has been patched in Kirby 3.5.8.1. Please update to this or a later version to fix the vulnerability.

Workarounds

We recommend to update to the patch release. If you cannot update immediately, you can work around the issue by disabling the multiselect field. This can be done by uncommenting this field from all your blueprints.

References

@lukasbestle lukasbestle published to getkirby/kirby Aug 24, 2022
Published to the GitHub Advisory Database Aug 29, 2022
Reviewed Aug 29, 2022
Published by the National Vulnerability Database Aug 29, 2022
Last updated Jan 29, 2023

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
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
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:H/PR:L/UI:N/S:U/C:H/I:L/A:N

EPSS score

0.075%
(34th percentile)

Weaknesses

CVE ID

CVE-2022-36037

GHSA ID

GHSA-3f89-869f-5w76

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.