CVE-2025-30148
Executive Summary
CVE-2025-30148 is a stored Cross-Site Scripting (XSS) vulnerability in the Silverstripe Framework, which powers the Silverstripe CMS. A bad actor with CMS edit permissions can inject a crafted encoded payload that bypasses client-side sanitization but is not caught by server-side sanitization. This allows JavaScript execution on the front end of the site. The vulnerability is fixed in version 5.3.23. The CVSS score is 5.4 (Medium), and the EPSS probability is 0.0%, indicating low active exploitation in the wild. No public exploit code or Nuclei templates are available at this time.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the Silverstripe Framework, a PHP package. Organizations using Silverstripe CMS should verify their dependency version and update to 5.3.23 or later. The package is typically installed via Composer, so ensure composer.json requires "silverstripe/framework": "^5.3.23".
CVSS Breakdown & Threat Level
- CVSS Score: 5.4 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: High (PR:H) – requires CMS edit permissions
- User Interaction: Required (UI:R) – victim must view the malicious content
- Scope: Unchanged (S:U)
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
Threat Level: Medium. Exploitation requires authenticated access with edit privileges, but the impact is limited to front-end JavaScript execution. No active exploitation has been observed.
Deep Dive & Mechanics
The vulnerability lies in the server-side sanitization logic of Silverstripe Framework. When a user with CMS edit permissions submits content containing a specially crafted encoded payload, the client-side sanitization (JavaScript) fails to detect it. The server-side sanitization also fails to properly decode and sanitize the payload, allowing it to be stored and later rendered on the front end.
The attack vector involves encoding the payload in a way that bypasses client-side checks (e.g., using HTML entities, Unicode escapes, or double encoding). The server-side logic does not perform sufficient decoding before sanitization, leading to the injection of malicious JavaScript.
Example of a bypass technique:
- Client-side sanitization may strip
<script>tags but not encoded variants like<script>. - Server-side sanitization may decode the payload once but not recursively, allowing the encoded script to pass through.
Vulnerable vs. Patched Code
Vulnerable Code (pre-5.3.23): The server-side sanitization likely uses a single-pass decoding or a regex that does not handle nested or encoded payloads.
// Vulnerable: single-pass sanitization
$clean = htmlspecialchars($input, ENT_QUOTES, 'UTF-8');
// Does not decode entities before sanitization
Patched Code (5.3.23): The patched version recursively decodes and sanitizes the input.
// Patched: recursive decoding and sanitization
function sanitizeInput($input) {
$decoded = html_entity_decode($input, ENT_QUOTES, 'UTF-8');
while ($decoded !== $input) {
$input = $decoded;
$decoded = html_entity_decode($input, ENT_QUOTES, 'UTF-8');
}
return htmlspecialchars($input, ENT_QUOTES, 'UTF-8');
}
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- Access to a Silverstripe CMS instance with edit permissions (e.g., Editor or Admin role).
- A page or content block that renders user input (e.g., a blog post, page content, or custom field).
Exploitation Steps:
- Craft a payload that bypasses client-side sanitization. Example:
<img src=x onerror=alert(1)> - Submit the payload via the CMS editor (e.g., in a page content field).
- The payload is stored in the database without proper server-side sanitization.
- When a victim visits the page, the browser decodes the HTML entity and executes the JavaScript.
Alternative payloads:
- Double-encoded:
%253Cscript%253Ealert(1)%253C/script%253E - Unicode escapes:
\u003cscript\u003ealert(1)\u003c/script\u003e
Blue Team (Defense & Detection)
Detection:
- Monitor CMS audit logs for suspicious content submissions containing encoded HTML entities or unusual characters.
- Use WAF rules to block requests with multiple layers of encoding.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Hunting:
- Search database for stored content containing patterns like
<,%3C,\u003c, or other encoding schemes. - Review recent changes to pages by users with edit permissions.
Lab Setup:
- Use Docker to spin up a vulnerable Silverstripe instance:
docker run -d -p 8080:80 --name silverstripe-vuln silverstripe/framework:5.3.22 - Access the CMS at
http://localhost:8080/adminand log in with default credentials. - Create a new page and inject the payload.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests containing multiple layers of encoding (e.g.,
%25253C,<). - Outbound connections to known malicious domains from the Silverstripe server.
- HTTP requests containing multiple layers of encoding (e.g.,
Host IOCs:
- Database entries with HTML entities in content fields (e.g.,
<script>). - Unusual JavaScript files or inline scripts in page source.
- Database entries with HTML entities in content fields (e.g.,
File IOCs:
- Modified Silverstripe core files (e.g.,
framework/src/View/SSViewer.php).
- Modified Silverstripe core files (e.g.,
Log IOCs:
- CMS audit logs showing content updates with encoded payloads.
- Web server logs with
400or500errors from sanitization failures.
Detection Engineering
YARA Rule
rule CVE_2025_30148_XSS_Payload {
meta:
description = "Detects encoded XSS payloads targeting Silverstripe CMS"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-30148"
strings:
$encoded_script = /&#(?:60|62|39|34);/ nocase
$double_encoded = /%25(?:3C|3E|27|22)/ nocase
$unicode_escape = /\\u00(?:3C|3E|27|22)/ nocase
condition:
any of them
}
Sigma Rule
title: CVE-2025-30148 - Silverstripe CMS Stored XSS
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects encoded XSS payloads in Silverstripe CMS content submissions
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains:
- 'SecurityID'
- 'Content'
cs-uri-query|re:
- '&#(60|62|39|34);'
- '%25(3C|3E|27|22)'
- '\\u00(3C|3E|27|22)'
condition: selection
falsepositives:
- Legitimate use of HTML entities in content
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-30148 - Silverstripe CMS Stored XSS Payload"; flow:to_server,established; content:"POST"; http_method; content:"SecurityID"; http_client_body; pcre:"/&#(60|62|39|34);/i"; pcre:"/%25(3C|3E|27|22)/i"; pcre:"/\\u00(3C|3E|27|22)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade Silverstripe Framework to version 5.3.23 or later.
composer require silverstripe/framework:^5.3.23 - Apply virtual patching via WAF to block encoded payloads.
- Review CMS user permissions and restrict edit access to trusted users only.
Long-term Mitigations:
- Implement Content Security Policy (CSP) headers:
Header set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval';" - Enable input validation on both client and server sides.
- Conduct regular security audits of CMS content.
Workarounds:
- If upgrade is not possible, manually patch the sanitization function in
framework/src/View/SSViewer.phpto recursively decode entities.
Report generated by Valters IT DevSecOps & CTI Engine