CVE-2024-27087 Kirby cross-site scripting (XSS) in the link field "Custom" type

Medium 4.6 Published Updated

Attackers can execute arbitrary JavaScript via the Custom link type in Kirby CMS, potentially compromising user sessions or data.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-27087?

CVE-2024-27087 is a medium-severity cross-site scripting vulnerability in getkirby kirby, published on 26 Feb 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Kirby is a content management system. The new link field introduced in Kirby 4 allows several different link types that each validate the entered link to the relevant URL format. It also includes a "Custom" link type for advanced use cases that don't fit any of the pre-defined link formats. As the "Custom" link type is meant to be flexible, it also allows the javascript: URL scheme. In some use cases this can be intended, but it can also be misused by attackers to execute arbitrary JavaScript code when a user or visitor clicks on a link that is generated from the contents of the link field. This vulnerability is patched in 4.1.1.

Weakness: CWE-79

Which versions are affected by CVE-2024-27087?

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

PackageAffectedFixed in
getkirby/cms PackagistFrom 4.0.04.1.1
getkirby/cms PackagistFrom 4.0.04.1.1

Products include Getkirby Kirby.

How do I fix CVE-2024-27087?

Upgrade getkirby/cms to 4.1.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-2024-27087 being exploited?

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

Sources

Also known as GHSA-63h4-w25c-3qv4.

Is CVE-2024-27087 in your software?

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

Check your SBOMs for free