Skip to main content

Kirby CMS CVE-2026-54002

| EUVDEUVD-2026-42687 HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-06-18 https://github.com/getkirby/kirby GHSA-wr9h-4r83-f4v6
8.5
CVSS 4.0 · Vendor: https://github.com/getkirby/kirby
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate to Panel as editor
  2. Delivery
    Craft markup nested under unknown tag
  3. Exploit
    Save into writer/list field (bypasses Dom::sanitize)
  4. Install
    Stored payload persists in content
  5. C2
    Admin views content in Panel
  6. Execute
    Script auto-executes in admin session
  7. Impact
    Escalate via authenticated API requests

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires an authenticated Kirby Panel user with permission to edit a writer or list field (PR:L), or site/plugin code that runs the Sane sanitization API - Sane::sanitizeFile()/$file->sanitizeContents()/Sane\Html|Svg|Xml::sanitize() - over untrusted input. The specific trigger is malicious markup placed as children of a tag that is neither allowlisted nor blocklisted in the sanitizer configuration, which then survives Dom::unwrap(). Payload execution requires a victim to render/view the poisoned content (UI:P) in the Panel or frontend. Limiting factors: Kirby's default upload protection uses the validation path, which is NOT affected, so validate-only upload workflows are not exposed; only the sanitize path is vulnerable. There is no unauthenticated or default-config remote exploitation.

Impact

The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N) yields 8.5 (High): network-reachable, low complexity, but requiring low-privilege authentication (PR:L) and passive victim interaction (UI:P) - a victim must view the poisoned content. This is a genuine privilege-escalation risk on multi-author sites where untrusted editors exist, since scripts run with the viewing admin's Panel/API permissions, and auto-firing payloads execute on page load. However, real-world exploitability is bounded: it is not remote-unauthenticated, the default upload protection (validation path) is unaffected, and there is no KEV listing and no EPSS score provided, and no public PoC - suggesting no observed mass exploitation. Priority is moderate-to-high specifically for sites that grant Panel access to untrusted or lower-trust users; single-admin or fully-trusted-editor deployments face little practical risk. Note the sanitize-vs-validate distinction is critical and easy to misjudge: only code taking the sanitize path is exposed.

Exploit ScenarioDerived

A low-privileged editor with Panel access edits a writer or list field and enters content that nests a script-bearing element inside an unknown/unrecognized HTML or XML tag, which passes through Dom::sanitize() uncleaned and is stored. When an admin later opens that content in the Panel (or a visitor loads the frontend page), the payload auto-executes in their session, firing authenticated API requests to escalate the attacker's privileges. No public PoC has been identified, and exploitation requires the attacker to already hold an authenticated editing account.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jul 09, 2026

Stored cross-site scripting in Kirby CMS (getkirby/cms) lets an authenticated Panel editor inject markup that survives Dom::sanitize() and executes as JavaScript when content is rendered in the Panel or on the site frontend. The flaw affects the writer and list fields plus the Sane HTML/SVG/XML sanitization API, and versions ≤ 4.9.3 and 5.0.0-alpha.1 through 5.4.3 are vulnerable. No public exploit identified at time of analysis, and this is not in CISA KEV, but the vendor rates it high severity because a low-privileged editor can escalate to an admin session.

Earlier versions of this analysis (2)
v2 Jul 09, 2026 - 19:41 cvss changed CVSS 8.5

Stored cross-site scripting in Kirby CMS (PHP flat-file CMS) lets authenticated Panel editors inject JavaScript that survives the framework's own sanitizer. The flaw lives in Dom::sanitize(), which powers the writer and list fields and the Sane\Html/Svg/Xml file-sanitization API; markup nested inside an unknown (neither allowlisted nor blocklisted) HTML/XML tag was unwrapped and copied out without being re-checked. A lower-privileged editor can therefore run scripts in the browser context of higher-privileged users such as admins, enabling privilege escalation via the Panel API. No public exploit identified at time of analysis and it is not in CISA KEV.

v1 Jun 18, 2026 - 15:53

Stored cross-site scripting in Kirby CMS versions up to 4.9.3 and 5.0.0-alpha.1 through 5.4.3 allows authenticated Panel users to inject malicious JavaScript via the writer or list fields, or any code path invoking Dom::sanitize() on untrusted input. The flaw lets a low-privileged editor execute scripts in the browser context of admins viewing the content, enabling Panel-session takeover and privilege escalation; no public exploit identified at time of analysis.

RemediationAI

Vendor-released patch: upgrade to Kirby 4.9.4 (https://github.com/getkirby/kirby/releases/tag/4.9.4) for the 4.x line or Kirby 5.4.4 (https://github.com/getkirby/kirby/releases/tag/5.4.4) for the 5.x line - or any later release; the vendor recommends moving to Kirby 5. In the fix, Dom::unwrap() now moves allowed children into the parent instead of cloning them, so those nodes remain covered by the sanitization pass. Critically, patching does not clean already-stored data: content sanitized and saved before the update may still contain injected payloads, so on security-critical multi-user sites you should audit existing writer/list field content (and any Sane-cleaned stored SVG/HTML files) and re-sanitize or manually review it after upgrading. As an interim compensating control before patching, restrict Panel/editing access to fully trusted users only and avoid serving stored SVG/HTML that was cleaned via the Sane API; the trade-off is reduced collaborative editing capability.

Affected VersionsENISA

kirby < 4.9.4
kirby 5.0.0, < 5.4.4

Affected Packages

composer getkirby/cms fix: 4.9.4, 5.4.4
euvd kirby fix: 4.9.4, 5.4.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Kirby is a flat-file PHP CMS. The root cause is CWE-79 (improper neutralization of input during web page generation) inside Kirby\Toolkit\Dom::sanitize(), which walks a DOM tree (HTML, SVG, or arbitrary XML) and removes disallowed nodes/attributes/PIs/doctypes/namespaces. Tags that are neither allowlisted nor blocklisted are 'unwrapped' via Dom::unwrap(), keeping their children. The vulnerable code cloned those unwrapped children into the result document without re-running the sanitization pass over them, so malicious markup nested under an unknown/unrecognized tag was copied through verbatim. Dom::sanitize() underpins the writer field, the list field (since 5.4.1 / backported 4.9.1), and the Sane\Html, Sane\Svg, Sane\Xml classes used by Sane::sanitizeFile() and $file->sanitizeContents(). Affected package per CPE is pkg:composer/getkirby/cms.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/getkirby/kirby) PRIMARY 8.5 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 8.7 HIGH

Authenticated editor (PR:L) stores a payload that fires only when a victim views it (UI:R) in another security context (S:C), enabling admin session/API compromise (C:H/I:H); no availability impact.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/getkirby/kirby).

CVSS VectorVendor: https://github.com/getkirby/kirby

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Jul 09, 2026 - 19:41 vuln.today
v3 - CVSS changed
Analysis Updated
Jul 09, 2026 - 19:41 vuln.today
v2 - CVSS changed
CVSS changed
Jul 09, 2026 - 19:22 NVD
8.5 (HIGH)

DescriptionCVE.org

TL;DR

This vulnerability affects Kirby sites and plugins that use the writer or list fields or that use $dom->sanitize(), Sane::sanitize(), Sane\Html::sanitize(), Sane\Svg::sanitize(), Sane\Xml::sanitize(), Sane::sanitizeFile() or $file->sanitizeContents() with untrusted input.

It was possible to inject malicious markup as children of an unknown HTML/XML tag, which would then be passed through Dom::sanitize() without being correctly sanitized according to the provided sanitization rules, causing a cross-site scripting (XSS) risk.

This vulnerability is of high severity for affected sites.

The default file upload protection is *not* affected, so sites that only *validate* uploaded files are not exposed to this vulnerability. The vulnerability can only be exploited by authenticated users.

----

Introduction

Cross-site scripting (XSS) is a type of vulnerability that allows executing any kind of JavaScript code inside the site frontend or 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.

In a *stored* XSS attack, the malicious payload is saved into the content data and has the potential to affect other users or site visitors.

Such 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.

A specific class of stored XSS is auto-firing, meaning the maliciously injected JavaScript code is executed by the browser when the page loads without the victim having to perform a specific action.

Affected components

The Dom::sanitize() method allows removing unwanted or malicious elements or attributes from DOM documents (which includes HTML, SVG or arbitrary XML data). Sanitized content is supposed to be protected against cross-site scripting (XSS) attacks by removing their impact from untrusted content input.

Dom::sanitize() internally checks all nodes and attributes of the DOM document. It removes nodes, attributes, processing instructions, doctypes and namespaces that are not allowed according to the provided configuration. Nodes with tags that have been explicitly blocklisted are removed together with their children. Nodes with explicitly allowlisted tags are kept. If a tag is neither allowlisted nor blocklisted, nodes with that tag are unwrapped by Dom::unwrap() (meaning the children are kept).

Dom::sanitize() is used in the following components:

  • The writer field sanitizes all entered content on the backend before it is saved to the content file.
  • The list field performs the same sanitization as the writer field since Kirby 5.4.1 (and in backported versions since Kirby 4.9.1).
  • The Kirby\Sane class package includes higher-level classes Sane\Html, Sane\Svg and Sane\Xml that all rely on DOM sanitization.
  • These classes are in turn also used by Sane::sanitizeFile() and $file->sanitizeContents().
  • Any of the mentioned methods could also be used in site or plugin code, for example in a file.create:before hook that cleans uploaded SVG/HTML files.

Only the sanitization path (returning a cleaned document) is affected. The validation path is *not* affected by this vulnerability. Kirby's default upload protection performs validation, so malicious SVG or HTML uploads continue to be rejected.

Impact

In affected releases, Dom::sanitize() did not sanitize nodes that had been unwrapped from their parent node. The affected child nodes would be copied into the resulting sanitized document without being sanitized.

An authenticated Panel user who can edit a writer or list field can store markup that survives sanitization and executes as JavaScript when the content is rendered, both in the Panel and on the site frontend. This allows a lower-privileged editor to run scripts in the context of higher-privileged users (for example admins) who view the content ("stored XSS"). Where a plugin or custom code cleans uploaded SVG/HTML with the Sane API, the same flaw leaves active content in the stored file, which executes when the file is served.

Patches

The problem has been patched in Kirby 4.9.4 and Kirby 5.4.4. Please update to one of these or a later version to fix the vulnerability.

In all of the mentioned releases, Dom::unwrap() now *moves* the allowed children to the parent instead of cloning them, so the exact nodes remain in the document and are covered by the sanitization pass.

Note that content that was passed through the sanitizer and stored as field content before the patch may contain malicious content that was not properly sanitized due to the vulnerable code. If you cannot rule out attackers under the authenticated users of a security-critical site, we advise reviewing the content for possible attacks or to re-sanitize all content of affected fields.

Credits

Thanks to Shafiq Aiman (@shafiqaimanx) for responsibly reporting the identified issue.

Executive ViewAI

Why It Matters

Kirby CMS versions up to 4.9.3 and 5.0.0-5.4.3 contain a stored XSS vulnerability in the content editor that allows authenticated editorial staff to execute arbitrary JavaScript and escalate their access to administrator privileges. Organizations running affected versions face immediate insider risk from compromised or malicious editors gaining full system control.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Medium
popular open-source PHP flat-file CMS, sizable but not ubiquitous footprint
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy