Severity by source
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-reachable Panel but AC:H for the required untrusted-dynamic-options configuration and multi-user precondition, PR:L for the authenticated account; high confidentiality and integrity, no availability metric.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Lifecycle Timeline
6DescriptionGitHub Advisory
TL;DR
This 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.
This vulnerability is of high severity for affected sites.
Users' 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.
----
Introduction
Server-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.
Injected 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.
In a Kirby site this can be used to access protected site information, alter site content or break site behavior.
Impact
Kirby 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.
Static 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.
However, 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.
Unfortunately, the results of these trusted queries on untrusted source data are run through the query parser a second time in affected Kirby releases.
Because 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.
Patches
The problem has been patched in Kirby 4.9.0 and Kirby 5.4.0. Please update to one of these or a later version to fix the vulnerability.
In 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.
Credits
Kirby thanks to @offset for responsibly reporting the identified issue.
AnalysisAI
Server-Side Template Injection in Kirby CMS (versions before 4.9.0 and 5.0.0-5.3.x) lets an authenticated Panel user achieve remote code execution and unauthorized read/write actions by planting malicious query templates in untrusted dynamic option sources. Affected sites are those using option fields (checkboxes, color, multiselect, select, radio, tags, toggles) or the Options package with values sourced from a query or API, where the double-resolution of dynamic values re-parses attacker-controlled strings such as {{ users.first.password }} or {{ page.delete }}. There is no public exploit identified at time of analysis and EPSS is very low (0.04%), but vendor-rated severity is high; SSVC technical impact is total.
Technical ContextAI
Kirby is a PHP file-based CMS whose Panel offers option fields that populate their choices either statically (in blueprints) or dynamically via the Options package classes OptionsQuery (Kirby query language) and OptionsApi (external/remote API data). Kirby's query syntax {{ query }} / {< query >} is intended to be resolved only when defined in trusted blueprints. The root cause is CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine), realized here as double template resolution: values returned from dynamic (untrusted) sources were passed through the query parser a second time, causing text embedded in a page title, content field, or attacker-controlled API response to be interpreted as a Kirby query rather than a literal string. Because Kirby queries can invoke object methods and traverse the site/user model, this template injection escalates to method calls like page.delete or disclosure of user credential hashes.
RemediationAI
Vendor-released patch: upgrade to Kirby 5.4.0 (https://github.com/getkirby/kirby/releases/tag/5.4.0) or, if remaining on the 4.x line, to Kirby 4.9.0 (https://github.com/getkirby/kirby/releases/tag/4.9.0), which is a backport of the 5.4.0 fix; the vendor recommends moving to Kirby 5. These releases stop double-resolving queries in option values from OptionsQuery/OptionsApi and only resolve queries configured directly in blueprints. If immediate patching is not possible, reduce exposure by converting affected option fields to statically defined blueprint options, or restrict options-from-query/options-from-API and direct OptionsApi/OptionsQuery usage to data sources whose values are fully trusted (e.g. remove fields whose options derive from user-editable page titles or third-party API content); note the trade-off that this disables dynamic option population and may require content-model changes. As a further compensating control, tighten Panel access so untrusted users cannot obtain accounts or edit content that feeds dynamic options, limiting who can plant malicious template strings.
Invision Community 5.0.0 through 5.0.6 contains an unauthenticated remote code execution vulnerability in the template e
Remote code execution in the WPML WordPress multilingual plugin (versions up to and including 4.6.12) allows Contributor
Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. Rated c
Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve
changedetection.io is an open source web page change detection, website watcher, restock monitor and notification servic
A server side template injection vulnerability in CrushFTP in all versions before 10.7.1 and 11.1.0 on all platforms all
Gibbon through 26.0.00 allows /modules/School%20Admin/messengerSettings.php Server Side Template Injection leading to Re
Server-side template injection in FOSSBilling versions prior to 0.8.0 allows authenticated administrators to execute arb
AutoGPT versions 0.3.4 and earlier are vulnerable to a Server-Side Template Injection (SSTI) that could lead to Remote C
Improper Neutralization of Special Elements Used in a Template Engine in GitHub repository mlflow/mlflow prior to 2.9.2.
Improper Neutralization of Special Elements Used in a Template Engine in GitHub repository microweber/microweber prior t
OneBlog v2.3.6 was discovered to contain a template injection vulnerability via the template management department. Rate
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-25369
GHSA-jcjw-58rv-c452