{"id":"CVE-2024-27087","aliases":["CVE-2024-27087","GHSA-63h4-w25c-3qv4"],"related":[],"kind":"vulnerability","state":"published","title":"Kirby cross-site scripting (XSS) in the link field \"Custom\" type","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### TL;DR\n\nThis vulnerability affects Kirby sites that use the new [link field](https://getkirby.com/docs/reference/panel/fields/link) and output the entered link without additional validation or sanitization.\n\nThe attack commonly requires user interaction by another user or visitor.\n\nThe link dialog of the writer field is *not* affected as the writer field content is automatically sanitized by the Kirby backend code. You are also already protected if you limit the acceptable link types with the `options` field property.\n\n----\n\n### Introduction\n\nCross-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.\n\nSuch 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.\n\n### Impact\n\nThe 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.\n\nAs 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.\n\n### Patches\n\nThe problem has been patched in [Kirby 4.1.1](https://github.com/getkirby/kirby/releases/tag/4.1.1). Please update to this or a [later version](https://github.com/getkirby/kirby/releases) to fix the vulnerability.\n\nIn the patch release, we have updated the link field to hide the \"Custom\" link type by default and added a warning to our [documentation](https://getkirby.com/docs/reference/panel/fields/link#custom-link-type) that this link type should only be enabled if additional validation is performed or no protection against XSS attacks is needed.\n\n### Credits\n\nThanks to Natwara Archeepsamooth (@PlyNatwara) for responsibly informing us about the `javascript:` attack vector.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Kirby es un sistema de gestión de contenidos. El nuevo campo de enlace introducido en Kirby 4 permite varios tipos de enlaces diferentes, cada uno de los cuales valida el enlace ingresado en el formato de URL correspondiente. También incluye un tipo de enlace \"Personalizado\" para casos de uso avanzados que no se ajustan a ninguno de los formatos de enlace predefinidos. Como el tipo de enlace \"Personalizado\" pretende ser flexible, también permite el esquema de URL javascript:. En algunos casos de uso, esto puede ser intencionado, pero los atacantes también pueden utilizarlo indebidamente para ejecutar código JavaScript arbitrario cuando un usuario o visitante hace clic en un enlace que se genera a partir del contenido del campo de enlace. Esta vulnerabilidad está parcheada en 4.1.1.","source":"nvd"}],"published":"2024-02-26T16:44:31.105Z","modified":"2026-09-10T03:50:09.744Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 4.0.0, < 4.1.1","status":"affected"}],"vendor":"getkirby","product":"kirby","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0","status":"affected","fixed":"4.1.1"}],"ecosystem":"Packagist","package":"getkirby/cms","purl":"pkg:composer/getkirby/cms","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.0.0","fixed":"4.1.1"}],"vendor":"getkirby","product":"kirby","cpe":"cpe:2.3:a:getkirby:kirby:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/getkirby/kirby/security/advisories/GHSA-63h4-w25c-3qv4","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/getkirby/kirby/commit/cda3dd9a15228d35e62ff86cfa87a67e7c687437","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27087","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/getkirby/kirby","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/getkirby/kirby/releases/tag/4.1.1","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-02-26T19:25:25.604Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-27087","url":"https://www.cve.org/CVERecord?id=CVE-2024-27087","licence":"CVE Terms of Use","modified":"2024-08-02T00:27:57.813Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-63h4-w25c-3qv4","url":"https://github.com/advisories/GHSA-63h4-w25c-3qv4","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:09.744Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-27087","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27087","licence":"Public domain","modified":"2026-06-17T07:19:08.290Z"}],"updatedAt":"2026-11-25T22:58:37.065Z","epss":{"score":0.00348,"percentile":0.30409,"date":"2026-12-01T12:00:22.000Z"}}