CVE-2022-36037 Cross-site scripting (XSS) from dynamic options in the multiselect field in Kirby

Medium 5.9 Published Updated

Attackers with influence on multiselect options can inject malicious HTML/JavaScript, leading to code execution and privilege escalation in the Kirby Panel.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-36037?

CVE-2022-36037 is a medium-severity cross-site scripting vulnerability in getkirby kirby, published on 29 Aug 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

kirby is a content management system (CMS) that adapts to many different projects and helps you build your own ideal interface. Cross-site scripting (XSS) is a type of vulnerability that allows execution of 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. If bad actors gain access to your group of authenticated Panel users they can escalate their privileges via the Panel session of an admin user. Depending on your site, other JavaScript-powered attacks are possible. The multiselect field allows selection of 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** to store HTML code. The browser of the victim who visited a page with manipulated multiselect options in the Panel will then have rendered this malicious HTML code when the victim opened the autocomplete dropdown. Users are *not* affected by this vulnerability if you don't use the multiselect field or don't use it with options that can be manipulated by attackers. The problem has been patched in Kirby 3.5.8.1.

Weakness: CWE-79

Which versions are affected by CVE-2022-36037?

2 open source packages ship an affected version, including getkirby/cms. It affects 1 product.

PackageAffectedFixed in
getkirby/cms PackagistAll versions3.5.8.1
getkirby/cms PackagistAll versions3.5.8.1

Products include Getkirby Kirby.

How do I fix CVE-2022-36037?

Upgrade getkirby/cms to 3.5.8.1 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2022-36037 being exploited?

There is no known exploitation of CVE-2022-36037 in the wild and no public exploit code.

Sources

Also known as GHSA-3f89-869f-5w76.

Is CVE-2022-36037 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free