Aug 21, 2026·6 min read·64 visits
An incomplete sanitization flow in Winter CMS caches raw, unsanitized custom CSS styles. On cache hits, the raw styles are output directly into the backend interface without sanitization, allowing attackers with branding configuration permissions to achieve administrative privilege escalation via Stored XSS.
Winter CMS versions prior to 1.2.14 are vulnerable to Stored Cross-Site Scripting (XSS) within the administrative backend interface. The flaw resides in the custom styles rendering pipeline for Brand Settings and Editor Settings. An attacker with privileges to modify backend branding or editor configurations can inject arbitrary JavaScript, which is written to the cache without sanitization. Subsequent page requests that result in a cache hit completely bypass output sanitization filters, leading to JavaScript execution in the sessions of other administrative users.
Winter CMS is an open-source content management system built on the Laravel framework. It provides administrative controls allowing high-privilege users to customize the appearance of the backend user interface. These customization controls are managed via the BrandSetting and EditorSetting components, which allow administrators to input and apply custom LESS and CSS style declarations.
An improper input neutralization vulnerability (CWE-79) exists in the way these custom CSS inputs are stored, compiled, cached, and rendered to backend users. Specifically, the rendering pipeline fails to ensure that style configurations retrieved from the caching layer undergo sanitization before being served to the client browser.
Because these style declarations are rendered directly into the HTML within administrative style blocks, an attacker who has permission to modify branding or editor settings can inject malicious HTML and JavaScript. When other administrative users access the backend interface, the browser parses the unescaped payload, leading to stored cross-site scripting (XSS) in the context of the victim's session.
The root cause of this vulnerability lies in the caching logic of the renderCss() method within both BrandSetting.php and EditorSetting.php. While the system was designed to sanitize custom CSS output using PHP's strip_tags() function during active compilation, the application fails to enforce this sanitization boundary when serving cached content.
When a request triggers a cache miss, the compiler compiles the custom LESS/CSS declarations. This compiled, raw string is stored directly in the cache forever using Cache::forever($cacheKey, $customCss). This creates a poisoned cache state where the raw, unescaped payload resides within the cache database.
When a subsequent page request is made, the application hits the cache via Cache::has($cacheKey). Instead of sanitizing the cached data, the system immediately returns the raw value via Cache::get($cacheKey). This architecture allows the raw, malicious payload to bypass output encoding and sanitization filters entirely on every subsequent page load.
An analysis of the vulnerable implementation in modules/backend/models/BrandSetting.php reveals the exact point where the validation filter is bypassed. The vulnerable renderCss implementation is structured as follows:
// Vulnerable Implementation in Winter CMS <= 1.2.13
public static function renderCss()
{
$cacheKey = self::instance()->cacheKey;
if (Cache::has($cacheKey)) {
// BUG: Directly returns the raw cached string without validation
return Cache::get($cacheKey);
}
try {
$customCss = self::compileCss();
// The raw compiled string is saved forever to the cache database
Cache::forever($cacheKey, $customCss);
}
catch (Exception $ex) {
$customCss = '/* ' . e($ex->getMessage()) . ' */';
}
// Sanitization is only applied to the cache-miss return path
return strip_tags($customCss);
}In the patched version, developers corrected the flow by wrapping the cache retrieval logic in a strip_tags() filter. This ensures that even if an existing cache entry contains malicious tags, they are stripped before being injected into the HTML response:
// Patched Implementation in Winter CMS v1.2.14
public static function renderCss()
{
$cacheKey = self::instance()->cacheKey;
if (Cache::has($cacheKey)) {
// FIX: Sanitization is now applied to cache hits
return strip_tags(Cache::get($cacheKey));
}
try {
$customCss = self::compileCss();
Cache::forever($cacheKey, $customCss);
} catch (Exception $ex) {
$customCss = '/* ' . e($ex->getMessage()) . ' */';
}
return strip_tags($customCss);
}By applying the mitigation at the point of cache retrieval, the application effectively neutralizes both newly compiled payloads and legacy, pre-existing poisoned cache entries that might reside in the database prior to the upgrade.
To exploit this vulnerability, an attacker must first obtain credentials for a backend user account that possesses either the backend.manage_branding or backend.manage_editor permissions. These permissions allow the customization of layout configurations and custom styles.
The attacker crafts a stylesheet payload. To bypass simple validation on saving, the attacker utilizes the LESS compiler's escape character (~) or standard syntax structures that are interpreted as strings by the compiler but escape the HTML context when output:
/* Brand Custom CSS Payload */
.x { content: ~"</style><script>alert('XSS-Exploited')</script><style>"; }Alternatively, for the editor stylesheet configuration, the following payload achieves the same result:
/* Editor Custom CSS Payload */
.fr-view .x { content: </style><script>alert('XSS-Exploited')</script><style>; }When these settings are saved, the backend cache is cleared and then primed on the next page request. The compiler parses the stylesheet and stores the raw, unescaped string in the cache database. When any subsequent administrative user logs in and navigates the backend dashboard, the system retrieves the raw cache value, inserting it directly into the dashboard <style> block. The victim's browser parses the </style> tag, terminates the CSS context, and immediately executes the injected JavaScript.
The impact of this Stored XSS vulnerability is critical. In a typical Winter CMS installation, backend administrators have extensive controls over the application, including the ability to manage system settings, users, and even raw PHP code execution through template editors if the developer tools are enabled.
An attacker who successfully executes arbitrary JavaScript within the session of an active administrator can capture session tokens, extract anti-CSRF tokens, or execute administrative actions on behalf of the victim. This enables an attacker with restricted branding management privileges to elevate their access to a full super-administrator or system developer role.
In environments where template-editing features are exposed in the backend, administrative privilege escalation directly leads to remote code execution (RCE) on the underlying server. This chain of execution allows the attacker to execute arbitrary commands, access sensitive databases, or achieve complete host compromise.
Remediation requires upgrading the system to Winter CMS version 1.2.14 or later. This can be accomplished by running composer update wintercms/winter inside the project root directory. In addition to the code patch, administrators should verify that backend administrative roles are properly audited.
To identify potential compromise or existing poisoned configurations on legacy systems, administrators can inspect the system_settings database table. The following SQL query searches for style records containing raw script or closing style tags:
SELECT * FROM system_settings
WHERE item = 'backend_brand_settings'
AND (value LIKE '%</style>%' OR value LIKE '%<script>%');Furthermore, Web Application Firewalls (WAF) can be configured to detect and block incoming request bodies containing escape attempts directed at CSS customization endpoints. Custom regex signatures should monitor backend parameters such as custom_css or html_custom_styles for the presence of closing HTML tags or script elements.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Winter CMS Winter CMS | < 1.2.14 | 1.2.14 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| Secondary CWE ID | CWE-524 |
| Attack Vector | Network |
| CVSS v3.1 Score | 8.4 (High) |
| Exploit Status | PoC / Regression Tested |
| KEV Status | Not Listed |
| Ransomware Association | No |
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.
CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.
CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.
CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.
A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.
CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.