Dev.to Security 🔐 Cybersecurity 👁 0 📖 5 min read

CVE-2026-88987: CVE-2026-88987: Stored Cross-Site Scripting via XHTML and XML Data URIs in Silverstripe Framework

CVE-2026-88987: Stored Cross-Site Scripting via XHTML and XML Data URIs in Silverstripe Framework Vulnerability ID: CVE-2026-88987 CVSS Score: 5.4 Published: 2026-11-16 CVE-2026-88987 (GHSA-qqrg-8jpm-8mph) is a stor

CVE-2026-88987: Stored Cross-Site Scripting via XHTML and XML Data URIs in Silverstripe Framework

Vulnerability ID: CVE-2026-88987
CVSS Score: 5.4
Published: 2026-11-16

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.

TL;DR

An incomplete MIME type denylist in Silverstripe Framework's XssSanitiser allows authenticated CMS authors to bypass HTML sanitization using data:application/xhtml+xml, data:text/xml, and data:application/xml URIs, resulting in stored Cross-Site Scripting (XSS). Upgrade to silverstripe/silverstripe-framework 6.2.13 to remediate the flaw.

⚠️ Exploit Status: POC

Technical Details

  • CVE ID: CVE-2026-88987 (GHSA-qqrg-8jpm-8mph)
  • Vulnerability Class: CWE-79: Stored Cross-Site Scripting (XSS)
  • 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 Component: SilverStripe\Core\XssSanitiser (silverstripe/silverstripe-framework < 6.2.13)
  • Attack Vector: Authenticated HTML submission containing data:application/xhtml+xml, data:text/xml, or data:application/xml URIs
  • Patched Version: 6.2.13
  • Exploit Status: Proof-of-Concept (Unit test payloads published in commit cea9c46eba4be31a06adf6980494623385e1296d)
  • CISA KEV Status: Not Listed

Affected Systems

  • silverstripe/silverstripe-framework
  • Silverstripe CMS
  • silverstripe/silverstripe-framework: < 6.2.13 (Fixed in: 6.2.13)

Code Analysis

Commit: cea9c46

[CVE-2026-88987] XSS via XHTML data URI (#12039)

File: src/Core/XssSanitiser.php
@@ -214,7 +214,14 @@ private function getStripAttributeContentsRegex(): string
     {
         $regexes = [
             $this->splitWithWhitespaceRegex('javascript:'),
+            // Data URIs whose MIME type is rendered as a scriptable document can execute JavaScript
+            // (e.g. inline <script> in an XHTML document), so they must be blocked just like data:text/html.
+            // An XML document whose root element is in the XHTML namespace is parsed as XHTML regardless
+            // of which of these XML media types declares it, so all three are equally exploitable.
             $this->splitWithWhitespaceRegex('data:text/html'),
+            $this->splitWithWhitespaceRegex('data:application/xhtml+xml'),
+            $this->splitWithWhitespaceRegex('data:text/xml'),
+            $this->splitWithWhitespaceRegex('data:application/xml'),
             $this->splitWithWhitespaceRegex('vbscript:'),
         ];
         // Regex is "starts with any of these, with optional whitespace at the start, case insensitive"
@@ -227,6 +234,9 @@ private function splitWithWhitespaceRegex(string $string): string
     {
         // Note that `\s` explicitly includes ALL invisible characters when used with the `u` modifier.
         // That includes unicode characters like the non-breaking space.
-        return implode('\s*', str_split($string));
+        // Each character is escaped so regex-special characters (e.g. the `+` in a MIME type) are
+        // matched literally rather than treated as quantifiers.
+        $chars = array_map(fn (string $char): string => preg_quote($char, '#'), str_split($string));
+        return implode('\s*', $chars);
     }
 }

Exploit Details

  • GitHub: Official commit containing unit tests with working XSS proof-of-concept payloads in XssSanitiserTest.php and HTMLEditorSanitiserTest.php.

Mitigation Strategies

  • Upgrade silverstripe/silverstripe-framework to version 6.2.13 or later to enforce sanitization of XML and XHTML data URIs.
  • Implement a strict Content Security Policy (CSP) that omits the 'data:' scheme from frame-src, object-src, and script-src directives.
  • Audit existing database content tables (SiteTree, SiteTree_Live, SiteTree_Versions, and custom HTMLText columns) for previously stored data: URIs using XML or XHTML media types.
  • Restrict CMS HTML editor configurations (TinyMCE valid_elements) to disallow , <object>, and <embed> tags if they are not required by business workflows.</li> </ul> <p><strong>Remediation Steps:</strong></p> <ol> <li>Run &#39;composer update silverstripe/framework:^6.2.13&#39; in the project root to pull the patched package.</li> <li>Verify the installed version using &#39;composer show silverstripe/framework&#39; to confirm version 6.2.13 or higher is active.</li> <li>Query database HTMLText columns for occurrences of &#39;data:application/xhtml+xml&#39;, &#39;data:text/xml&#39;, and &#39;data:application/xml&#39; and sanitize any suspicious records.</li> <li>Configure HTTP response headers on the web server or CDN to include &#39;Content-Security-Policy: object-src none; frame-src self;&#39;.</li> </ol> <h2> <a name="references" href="#references" class="anchor"> </a> References </h2> <ul> <li><a href="https://github.com/silverstripe/silverstripe-framework/security/advisories/GHSA-qqrg-8jpm-8mph">GitHub Security Advisory: GHSA-qqrg-8jpm-8mph</a></li> <li><a href="https://github.com/silverstripe/silverstripe-framework/commit/cea9c46eba4be31a06adf6980494623385e1296d">Patch Commit cea9c46eba4be31a06adf6980494623385e1296d</a></li> <li><a href="https://github.com/silverstripe/silverstripe-framework/pull/12039">Pull Request #12039: [CVE-2026-88987] XSS via XHTML data URI</a></li> <li><a href="https://github.com/silverstripe/silverstripe-framework/releases/tag/6.2.13">Silverstripe Framework 6.2.13 Release Notes</a></li> <li><a href="https://www.silverstripe.org/download/security-releases/cve-2026-88987">Silverstripe Security Release Advisory: CVE-2026-88987</a></li> <li><a href="https://nvd.nist.gov/vuln/detail/CVE-2026-88987">National Vulnerability Database: CVE-2026-88987</a></li> <li><a href="https://www.cve.org/CVERecord?id=CVE-2026-88987">CVE.org Record: CVE-2026-88987</a></li> </ul> <hr> <p><em><a href="https://cvereports.com/reports/CVE-2026-88987">Read the full report for CVE-2026-88987 on our website</a> for more details including interactive diagrams and full exploit analysis.</em></p>
📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.