Nov 17, 2026·9 min read·3 visits
Silverstripe Framework prior to 6.2.13 does not strip data:image/svg* URIs during HTML sanitization, allowing authenticated content authors to execute stored XSS via navigational links or embedded subdocument tags.
A Stored Cross-Site Scripting (XSS) vulnerability exists in Silverstripe Framework versions prior to 6.2.13 within the SilverStripe\Core\XssSanitiser component. The HTML sanitizer fails to strip SVG data URIs (data:image/svg*) from dangerous HTML attributes such as href, src, lowsrc, and data. Authenticated CMS authors can persist crafted SVG data URIs in stored content, leading to arbitrary JavaScript execution in the browser context of users who view or interact with the rendered page.
Silverstripe Framework (silverstripe/silverstripe-framework) is the core PHP framework that underpins the Silverstripe Content Management System (CMS). To allow content authors and editors to create rich HTML content while preventing script injection, the framework provides an internal HTML sanitization utility located at SilverStripe\Core\XssSanitiser. This sanitizer parses user-supplied HTML fragments into a DOM structure and strips disallowed elements and dangerous attribute values before the content is stored or rendered.
In versions prior to 6.2.13, XssSanitiser contains an incomplete blocklist of dangerous URI schemes and media types when validating HTML attributes (href, src, lowsrc, and data). While the sanitizer explicitly blocks schemes such as javascript: and vbscript:, as well as active document data URIs like data:text/html and data:application/xml, it omits data:image/svg (commonly used as data:image/svg+xml).
Unlike raster image formats such as PNG or JPEG, Scalable Vector Graphics (SVG) documents are XML-based and support embedded ECMAScript (<script>) and inline event handlers (such as onload). This omission is tracked as CVE-2026-88988 (and GHSA-xwg4-8hqh-79jq) and maps to CWE-79 (Improper Neutralization of Input During Web Page Generation).
An authenticated user with privileges to author or edit CMS content can embed a base64-encoded or URL-encoded SVG payload within a hyperlink or subdocument element. When a victim views the page containing an embedded subdocument (such as an <iframe>) or clicks a crafted hyperlink (<a>), the browser interprets the SVG payload as an active document and executes the embedded JavaScript.
The root cause of CVE-2026-88988 resides in SilverStripe\Core\XssSanitiser::getStripAttributeContentsRegex(), which constructs the regular expression used by stripAttributeContents(DOMElement $element) to inspect and remove dangerous attributes from DOM nodes. When the sanitizer processes an HTML string, it iterates over target attributes (href, src, lowsrc, and data) and checks if their values match known executable URI schemes.
Prior to version 6.2.13, getStripAttributeContentsRegex() only generated patterns for six specific prefixes: javascript:, data:text/html, data:application/xhtml+xml, data:text/xml, data:application/xml, and vbscript:. The implementation operated under the assumption that data:image/* URIs represent inert graphical assets. This assumption holds true when an SVG data URI is loaded strictly inside an <img> tag, as modern browser security models restrict script execution inside image rendering contexts.
However, stripAttributeContents() applies the same regular expression across all URI-accepting attributes regardless of the enclosing HTML element. When a data:image/svg+xml URI is placed inside the src attribute of an <iframe>, <embed>, or <object> element, or within the href attribute of an <a> tag, the browser does not treat the resource as a passive image. Instead, it instantiates a document browsing context and parses the SVG XML structure, triggering any internal <script> blocks or onload event handlers.
Because the sanitizer preserved data:image/svg+xml across all elements, any allowed HTML tag capable of initiating navigation or loading a subdocument became a vehicle for stored XSS.
The vulnerability was addressed in commit 9b61e6d04da1a3183c4ef4081cb64fd31ae0701f (Pull Request #12040). The patch modifies src/Core/XssSanitiser.php to include data:image/svg in the list of disallowed attribute prefixes.
--- a/src/Core/XssSanitiser.php
+++ b/src/Core/XssSanitiser.php
@@ -35,10 +35,11 @@ class XssSanitiser
private bool $keepInnerHtmlOnRemoveElement = true;
+ /**
+ * This is not config and only used for unit testing
+ */
+ private bool $removeDataSvg = true;
+
- private bool $removeSvgFile = true;
-
/**
* Remove XSS attack vectors from an HTML fragment string
*/
@@ -224,6 +225,12 @@ private function getStripAttributeContentsRegex(): string
$this->splitWithWhitespaceRegex('data:application/xml'),
$this->splitWithWhitespaceRegex('vbscript:'),
];
+ if ($this->removeDataSvg) {
+ // SVG documents can carry scripts, so an SVG data URI is a script-capable document reference.
+ // Note the media type is matched as a prefix so that `data:image/svg+xml` and any other
+ // `data:image/svg*` variation are both caught.
+ $regexes[] = $this->splitWithWhitespaceRegex('data:image/svg');
+ }
// Regex is "starts with any of these, with optional whitespace at the start, case insensitive"
// \x08 is the backspace character, though it only causes vulnerabilities if it's at the start
// or end of a stringThe fix utilizes two existing defensive mechanisms in XssSanitiser to prevent filter evasion:
data:image/svg): Rather than matching the full MIME type data:image/svg+xml, the patch matches the shorter prefix data:image/svg. This ensures that non-standard or malformed MIME variations that browsers might still sniff or accept as SVG documents are caught by the filter.splitWithWhitespaceRegex): HTML parsers and browsers frequently ignore embedded whitespace, tabs, newlines, or control characters (such as the backspace character \x08) within URI schemes. By passing 'data:image/svg' through splitWithWhitespaceRegex(), the resulting regular expression matches obfuscated strings such as d a t a : i m a g e / s v g + x m l or strings prefixed with .In addition to the core logic change, the commit updates tests/php/Core/XssSanitiserTest.php. Notably, a previous unit test explicitly asserted that <IMG SRC="data:image/svg+xml;base64,..."> containing an <script> tag should be preserved because it was considered non-exploitable inside an <img> tag. The updated test suite reverses this behavior, asserting that the src attribute is stripped completely (<img>), and adds regression tests for <a href>, <iframe src>, <img lowsrc>, whitespace obfuscation, and backspace character injection.
The fix is complete with respect to data:image/svg* URI injection across the targeted attributes (href, src, lowsrc, data), while preserving inert raster data URIs such as data:image/png;base64,....
To exploit CVE-2026-88988, an attacker requires an authenticated session with sufficient permissions to create or modify HTML content fields that are processed by XssSanitiser (for example, a standard CMS author or contributor role). No special configuration is required, as XssSanitiser is the default sanitization mechanism for rich text fields.
If the CMS configuration allows <iframe>, <embed>, or <object> tags in rich text content, the attacker can achieve automatic script execution when a victim views the page. The payload <svg onload=alert(1)> is base64-encoded as PHN2ZyBvbmxvYWQ9YWxlcnQoMSk+ and placed in the src attribute:
<iframe src="data:image/svg+xml;base64,PHN2ZyBvbmxvYWQ9YWxlcnQoMSk+"></iframe>When another CMS user or site visitor loads the page containing this element, the browser renders the <iframe> subdocument and immediately executes the onload handler.
In default configurations where <iframe> elements may be restricted by TinyMCE or sanitizer element allowlists, standard anchor (<a>) tags remain permitted. An attacker can embed an SVG document containing an inline <script> block:
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" x="0" y="0" width="194" height="200" id="xss">
<script type="text/ecmascript">alert("XSS");</script>
</svg>Encoding this payload in base64 and embedding it into an anchor tag yields:
<a href="data:image/svg+xml;base64,PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjAiIHk9IjAiIHdpZHRoPSIxOTQiIGhlaWdodD0iMjAwIiBpZD0ieHNzIj48c2NyaXB0IHR5cGU9InRleHQvZWNtYXNjcmlwdCI+YWxlcnQoIlhTUyIpOzwvc2NyaXB0Pjwvc3ZnPg==">View Document</a>Prior to the patch, attackers could also use whitespace or control character obfuscation to bypass simple external WAF signatures while still passing through XssSanitiser:
<!-- Whitespace obfuscation -->
<a href=" d a t a : i m a g e / s v g + x m l ;base64,PHN2ZyBvbmxvYWQ9YWxlcnQoMSk+">click</a>
<!-- Backspace control character prefix -->
<a href="data:image/svg+xml;base64,PHN2ZyBvbmxvYWQ9YWxlcnQoMSk+">click</a>CVE-2026-88988 is rated at a CVSS v3.1 base score of 5.4 (Medium) with the vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
> [!NOTE]
> In modern browsers (such as Chromium and Firefox), top-level navigation or <iframe> embedding of a data: URI typically assigns the resulting document an opaque (unique) origin rather than inheriting the parent page's origin (window.origin === "null"). While this restricts direct DOM access to document.cookie on the parent origin in modern browser engines, the executing script can still perform phishing overlays, initiate unauthorized top-level redirects, or exploit same-site request handling depending on cookie SameSite attributes.
In environments where an administrative user reviews content authored by lower-privileged editors within the Silverstripe CMS backend, stored XSS payloads provide a pathway for privilege escalation or administrative action spoofing.
Organizations running Silverstripe CMS or standalone deployments of silverstripe/silverstripe-framework must upgrade to version 6.2.13 or later. The update can be applied via Composer:
composer update silverstripe/framework:^6.2.13After updating the package, review custom project code to ensure that SilverStripe\Core\XssSanitiser has not been overridden via Silverstripe's dependency injector with custom sanitization rules that bypass getStripAttributeContentsRegex().
For deployments that cannot be immediately upgraded, administrators can mitigate the execution of injected data: URIs by enforcing a restrictive Content Security Policy (CSP) HTTP response header:
Content-Security-Policy: default-src 'self'; script-src 'self'; frame-src 'self'; object-src 'none';Ensure that the data: scheme is explicitly excluded from default-src, script-src, frame-src, child-src, and object-src directives. Note that img-src 'self' data: remains safe to permit, as browsers do not execute scripts within <img> elements.
Additionally, Web Application Firewalls (WAF) inspecting incoming HTTP POST/PUT requests to the Silverstripe administrative interface (/admin/*) should be configured to block HTML attributes containing data:image/svg:
(?i)(?:href|src|data|lowsrc)\s*=\s*['"]?\s*(?:[\x00-\x20]|&#x?[0-9a-f]+;)*d\s*a\s*t\s*a\s*:\s*i\s*m\s*a\s*g\s*e\s*\/\s*s\s*v\s*gFinally, administrators should audit existing database content tables (such as SiteTree and SiteTree_Live) for stored occurrences of data:image/svg in HTMLText fields, as upgrading the sanitizer only filters content during subsequent save or sanitization operations.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
silverstripe/silverstripe-framework Silverstripe | < 6.2.13 | 6.2.13 |
| Attribute | Detail |
|---|---|
| Vulnerability Type | Stored Cross-Site Scripting (CWE-79) |
| Affected Component | SilverStripe\Core\XssSanitiser |
| Attack Vector | Network (Authenticated CMS Author) |
| CVSS v3.1 Score | 5.4 Medium (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N) |
| Affected Versions | < 6.2.13 |
| Patched Version | 6.2.13 |
| Exploit Status | Proof-of-Concept (Unit Tests) |
| CISA KEV Status | Not Listed |
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CVE-2026-88987 (GHSA-qqrg-8jpm-8mph) is a stored Cross-Site Scripting (XSS) vulnerability in the Silverstripe Framework prior to version 6.2.13. The framework's HTML sanitization engine, XssSanitiser, relies on an incomplete regular expression denylist when filtering URI schemes in HTML attributes. Specifically, the sanitizer strips data:text/html URIs but fails to restrict executable XML and XHTML media types such as data:application/xhtml+xml, data:text/xml, and data:application/xml. An authenticated user with content creation privileges can embed crafted data URIs inside HTML attributes like iframe src or object data, leading to arbitrary JavaScript execution when the content is rendered by a victim's browser.
CVE-2026-88989 (tracked as GHSA-3qh3-54qg-gpq3) is a missing authorization vulnerability (CWE-862) in the Silverstripe Framework affecting versions prior to 6.2.13. The flaw exists within the GridFieldDetailForm_ItemRequest request handler, which orchestrates record creation and editing workflows inside the Silverstripe CMS backend. Specifically, the server-side persistence method saveFormIntoRecord() fails to verify whether an authenticated user possesses the necessary creation permissions (canCreate) when processing an unpersisted DataObject record. Consequently, a low-privileged CMS user who has permission to access a GridField interface and edit existing records can bypass role-based creation restrictions. By sending a crafted HTTP POST request directly to the item/new endpoint with the action_doSave parameter, the user can instantiate and persist unauthorized database records. The vulnerability is rated Medium severity with a CVSS v3.1 base score of 4.3 and is remediated in Silverstripe Framework version 6.2.13.
Silverstripe Framework prior to version 6.2.13 contains an improper privilege management vulnerability (CWE-269) within the Group authorization and validation logic. A delegated administrator possessing the CMS_ACCESS_SecurityAdmin permission, but lacking full ADMIN privileges, can edit or reparent groups that acquire administrative capabilities indirectly via permission roles or ancestor inheritance. By adding their own account to such a group or moving a controlled group underneath a role-privileged parent, the user escalates to full administrative access across the CMS.
A missing authorization and type validation vulnerability in Silverstripe Framework prior to version 6.2.13 allows authenticated CMS users to convert database records into arbitrary DataObject classes via user-controlled ClassName parameters in GridField detail forms.
CVE-2026-91115 (GHSA-c94f-87xg-65wf) is an unsafe reflection vulnerability in the Silverstripe Framework affecting versions 6.0.0 prior to 6.2.13. The built-in development task i18nTextCollectorTask passes the user-supplied 'writer' parameter directly to Silverstripe's dependency injection container (Injector::inst()->get()) without verifying that the requested class implements the expected Writer interface. Because the dependency injector supports instantiating arbitrary classes with attacker-supplied constructor arguments, and because nested task URLs bypassed interactive confirmation middleware, an attacker can achieve remote code execution via unauthenticated requests on development instances or via Cross-Site Request Forgery (CSRF) against authenticated administrators on production instances.
CVE-2026-129237 is a partial path traversal (Zip Slip) vulnerability in qbee-agent, the device agent for the qbee.io IoT device management platform. Prior to version 2026.41, the tar archive extraction routine in app/utils/tar.go used strings.HasPrefix without enforcing a directory separator boundary. When the Docker Compose bundle configuration has UseContext enabled, an authenticated user with delegated configuration or file management privileges can supply a crafted tar archive containing sibling-prefix traversal sequences, allowing directory creation and file writes into adjacent sibling directories outside the intended extraction root.