CVE-2026-34587: Getkirby/cms Kirby Has Server-Side Template Injection Vulnerability
HIGHCVE-2026-34587 is a HIGH (CVSS 8.1) kirby has server-side template injection vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting Getkirby/cms libraries in the Packagist ecosystem. The issue involves kirby has server-side template injection (ssti) via double template resolution in option rendering. Remediation is available by upgrading affected packages to version 4.9.0, 5.4.0.
CVE-2026-34587 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-34587
To remediate this vulnerability, upgrade all affected Getkirby/cms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade getkirby/cms to 4.9.0
Upgrade getkirby/cms to 5.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for getkirby/cms
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-34587, inspect your project dependencies for Getkirby/cms:
inspect dependencies for getkirby/cms
Analyze the terminal output to locate any version of Getkirby/cms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.9.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine, where the product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. In Getkirby/cms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-34587 Affected Getkirby/cms Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
getkirby/cms
|
Packagist |
< 4.9.0
|
4.9.0
|
|
getkirby/cms
|
Packagist |
≥ 5.0.0
< 5.4.0
|
5.4.0
|
References
Frequently Asked Questions
What is CVE-2026-34587?
Which Getkirby/cms versions are affected?
What version fixes CVE-2026-34587?
Is getkirby/cms affected?
What is the CVSS score of CVE-2026-34587?
What CWE is associated with CVE-2026-34587?
How can I check Packagist dependencies for CVE-2026-34587?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jcjw-58rv-c452",
"modified" : "2026-05-05T15:43:54Z",
"published" : "2026-04-23T21:24:00Z",
"aliases" : [ "CVE-2026-34587" ],
"summary" : "Kirby has Server-Side Template Injection (SSTI) via double template resolution in option rendering",
"details" : "### TL;DR\n\nThis vulnerability affects all Kirby sites that use option fields (`checkboxes`, `color`, `multiselect`, `select`, `radio`, `tags` or `toggles`) with options from a query or API whose values may not be fully trusted. It also affects direct uses of the `OptionsApi` or `OptionsQuery` classes of Kirby's `Options` package from plugin or site code. The attack requires either an attacker in the group of authenticated Panel users or user interaction of another authenticated user.\n\n**This vulnerability is of high severity for affected sites.**\n\nUsers' Kirby sites are *not* affected if they are not using any of the mentioned fields or the `Options` package, if all options are defined statically in the blueprints or if all dynamically gathered options are to be trusted.\n\n----\n\n### Introduction\n\nServer-Side Template Injection vulnerabilities (SSTI) occur when user input is embedded in a template in an unsafe manner and results in remote code execution on the server.\n\nInjected user input is wrongly treated as a template command instead of as a literal string of text. This allows attackers to query arbitrary information from the affected system or call arbitrary methods to perform actions.\n\nIn a Kirby site this can be used to access protected site information, alter site content or break site behavior.\n\n### Impact\n\nKirby provides field types (`checkboxes`, `color`, `multiselect`, `select`, `radio`, `tags` and `toggles`) that offer a fixed set of options from a configured list. This configured list can be statically defined in the blueprint or it can come from a Kirby query or (external) API source. Options coming from a query or API are treated as dynamic.\n\nStatic options can contain queries in the form `{{ query }}` or `{< query >}` that are then evaluated to a static value. Because the queries are defined in the blueprint, they can be trusted and cannot be controlled by attackers.\n\nHowever, dynamic options can often not be trusted. This is why the \"options from query\" and \"options from API\" modes are intended to resolve the option values and text strings based on queries not defined within the data source but within the blueprint.\n\nUnfortunately, the results of these trusted queries on untrusted source data are run through the query parser a second time in affected Kirby releases.\n\nBecause of the double-resolution of dynamic option values and text strings, attackers could place malicious query templates such as `{{ users.first.password }}` or `{{ page.delete }}` in the option sources such as page titles or external API data controlled by the attacker. These queries would then be executed when the field is loaded in the Panel. When the attacker directly accesses the respective Panel view, they could get access to information normally hidden from them. As the malicious query templates are loaded for all users, it could also lead to malicious write access when another user with a higher permission level accesses the manipulated Panel view.\n\n### Patches\n\nThe problem has been patched in [Kirby 4.9.0](https://github.com/getkirby/kirby/releases/tag/4.9.0) and [Kirby 5.4.0](https://github.com/getkirby/kirby/releases/tag/5.4.0). Please update to one of these or a [later version](https://github.com/getkirby/kirby/releases) to fix the vulnerability.\n\nIn all of the mentioned releases, Kirby has updated the `Options` logic to no longer double-resolve queries in option values coming from `OptionsQuery` or `OptionsApi` sources. Kirby now only resolves queries that are directly configured in the blueprints.\n\n### Credits\n\nKirby thanks to @offset for responsibly reporting the identified issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "getkirby/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.9.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "getkirby/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/getkirby/kirby/security/advisories/GHSA-jcjw-58rv-c452"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34587"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/getkirby/kirby"
}, {
"type" : "WEB",
"url" : "https://github.com/getkirby/kirby/releases/tag/4.9.0"
}, {
"type" : "WEB",
"url" : "https://github.com/getkirby/kirby/releases/tag/5.4.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-23T21:24:00Z",
"nvd_published_at" : "2026-04-24T01:16:12Z"
}
}