CVE-2026-49276: Kirby Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-rhj6-r49h-5932
CWE-83
Published
Advisory Summary

CVE-2026-49276 is a HIGH cross-site scripting vulnerability (CWE-83: Improper Neutralization of Script in Attributes in a Web Page) affecting Kirby libraries in the Packagist ecosystem. The issue involves self cross-site scripting (self-xss) in the writer field. Remediation is available by upgrading affected packages to version 4.9.4, 5.4.4.

CVE-2026-49276 at a Glance

CVE Identifier CVE-2026-49276
GHSA Identifier GHSA-rhj6-r49h-5932
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-83: Improper Neutralization of Script in Attributes in a Web Page
Affected Product Kirby
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-49276

To remediate this vulnerability, upgrade all affected Kirby dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

getkirby/cms fixed: 4.9.4
Upgrade getkirby/cms to 4.9.4
getkirby/cms fixed: 5.4.4
Upgrade getkirby/cms to 5.4.4
Verify Direct and Transitive Dependencies

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-49276, inspect your project dependencies for Kirby:

inspect dependencies for getkirby/cms

Analyze the terminal output to locate any version of Kirby in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.9.4), 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-83: Improper Neutralization of Script in Attributes in a Web Page, where the product does not neutralize or incorrectly neutralizes "javascript:" or other uris from dangerous attributes within tags, such as onmouseover, onload, onerror, or style. In Kirby, 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

### TL;DR This vulnerability affects Kirby sites that use the writer field in any blueprint. It was possible to include a scripting link as the target of a link (or email link). This link target would then be clickable by the user who entered it. A successful attack commonly requires knowledge of the content structure by the attacker as well as social engineering of a user with access to the Panel. The attack *cannot* be automated. In Kirby's default configuration, the vulnerability is limited to self-XSS and *cannot* directly affect other users or visitors of the site. Panel plugins that are directly using the `<k-writer>` component may also be affected by stored XSS if they don't sanitize the resulting HTML before saving it to the content. **This vulnerability is of high severity for affected sites.** ---- ### Introduction Cross-site scripting (XSS) is a type of vulnerability that allows attackers 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. *Self* cross-site scripting (self-XSS) typically involves a user inadvertently executing malicious code within their own context, often through social engineering techniques. This can occur when a user is tricked into pasting and executing malicious JavaScript code into the browser's developer console, address bar or form fields. 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. ### Affected components The `writer` field allows users to input formatted text, including links to arbitrary URLs and email addresses. Its `link` and `email` marks are therefore a target for XSS attacks. As the vulnerability is in the writer mark components, it also affects all uses of the `<k-writer>` component in Panel plugins. ### Impact In affected releases, the `link` and `email` marks did not prevent XSS payloads from being submitted to the writer field's content data: - The `link` mark allowed users to enter JavaScript URLs using the "custom" URL type. These URLs would already be sanitized by the backend before storing the malicious link in the content file. However, the link may be clicked by the same user who entered it before the content is saved. - The `email` mark was also vulnerable to injected JavaScript URLs. However, it was not possible to perform the attack via the Panel user interface due to email validation. The attack needed to be performed via a side channel such as the browser console. The vulnerability allows attackers to inject malicious links into content. If the authenticated user clicked such a link before saving the content, the malicious script code would then be executed in their browser. ### Patches The problem has been patched in [Kirby 4.9.4](https://github.com/getkirby/kirby/releases/tag/4.9.4) and [Kirby 5.4.4](https://github.com/getkirby/kirby/releases/tag/5.4.4). Please update to one of these or a [later version](https://github.com/getkirby/kirby/releases) to fix the vulnerability. In all of the mentioned releases, we have added more robust validation against dangerous URL schemes that are entered in the affected writer marks.

CVE-2026-49276 Affected Kirby Versions

2 component(s)
Fixed Versions:
4.9.45.4.4
Product / Package Ecosystem Affected Versions Fixed Version
getkirby/cms
Packagist
< 4.9.4
4.9.4
getkirby/cms
Packagist
≥ 5.0.0-alpha.1
< 5.4.4
5.4.4

References

Frequently Asked Questions

What is CVE-2026-49276?
CVE-2026-49276 is a security vulnerability in Kirby involving Self cross-site scripting (self-XSS) in the writer field under CWE-83: Improper Neutralization of Script in Attributes in a Web Page.
Which Kirby versions are affected?
Affected versions include releases prior to 4.9.4, 5.4.4 across affected packages: getkirby/cms.
What version fixes CVE-2026-49276?
Upgrading to 4.9.4, 5.4.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is getkirby/cms affected?
Yes, getkirby/cms is affected in releases prior to 4.9.4, 5.4.4. Upgrade your dependency to 4.9.4, 5.4.4 or later.
What CWE is associated with CVE-2026-49276?
CVE-2026-49276 is classified under CWE-83: Improper Neutralization of Script in Attributes in a Web Page (The product does not neutralize or incorrectly neutralizes "javascript:" or other URIs from dangerous attributes within tags, such as onmouseover, onload, onerror, or style.).
How can I check Packagist dependencies for CVE-2026-49276?
Run the dependency tree command: 'inspect dependencies for getkirby/cms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rhj6-r49h-5932",
  "modified" : "2026-06-18T15:04:41Z",
  "published" : "2026-06-18T15:04:41Z",
  "aliases" : [ "CVE-2026-49276" ],
  "summary" : "Kirby: Self cross-site scripting (self-XSS) in the writer field",
  "details" : "### TL;DR\n\nThis vulnerability affects Kirby sites that use the writer field in any blueprint.\n\nIt was possible to include a scripting link as the target of a link (or email link). This link target would then be clickable by the user who entered it.\n\nA successful attack commonly requires knowledge of the content structure by the attacker as well as social engineering of a user with access to the Panel. The attack *cannot* be automated.\n\nIn Kirby's default configuration, the vulnerability is limited to self-XSS and *cannot* directly affect other users or visitors of the site. Panel plugins that are directly using the `<k-writer>` component may also be affected by stored XSS if they don't sanitize the resulting HTML before saving it to the content.\n\n**This vulnerability is of high severity for affected sites.**\n\n----\n\n### Introduction\n\nCross-site scripting (XSS) is a type of vulnerability that allows attackers 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\n*Self* cross-site scripting (self-XSS) typically involves a user inadvertently executing malicious code within their own context, often through social engineering techniques. This can occur when a user is tricked into pasting and executing malicious JavaScript code into the browser's developer console, address bar or form fields.\n\nIn a *stored* XSS attack, the malicious payload is saved into the content data and has the potential to affect other users or site visitors.\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### Affected components\n\nThe `writer` field allows users to input formatted text, including links to arbitrary URLs and email addresses. Its `link` and `email` marks are therefore a target for XSS attacks.\n\nAs the vulnerability is in the writer mark components, it also affects all uses of the `<k-writer>` component in Panel plugins.\n\n### Impact\n\nIn affected releases, the `link` and `email` marks did not prevent XSS payloads from being submitted to the writer field's content data:\n\n- The `link` mark allowed users to enter JavaScript URLs using the \"custom\" URL type. These URLs would already be sanitized by the backend before storing the malicious link in the content file. However, the link may be clicked by the same user who entered it before the content is saved.\n- The `email` mark was also vulnerable to injected JavaScript URLs. However, it was not possible to perform the attack via the Panel user interface due to email validation. The attack needed to be performed via a side channel such as the browser console.\n\nThe vulnerability allows attackers to inject malicious links into content. If the authenticated user clicked such a link before saving the content, the malicious script code would then be executed in their browser.\n\n### Patches\n\nThe problem has been patched in [Kirby 4.9.4](https://github.com/getkirby/kirby/releases/tag/4.9.4) and [Kirby 5.4.4](https://github.com/getkirby/kirby/releases/tag/5.4.4). 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, we have added more robust validation against dangerous URL schemes that are entered in the affected writer marks.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/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.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.9.3"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "getkirby/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0-alpha.1"
      }, {
        "fixed" : "5.4.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.4.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/getkirby/kirby/security/advisories/GHSA-rhj6-r49h-5932"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/getkirby/kirby"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getkirby/kirby/releases/tag/4.9.4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getkirby/kirby/releases/tag/5.4.4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-83" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-18T15:04:41Z",
    "nvd_published_at" : null
  }
}