CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-5CWR-5JXG-PCF6

GHSA-5CWR-5JXG-PCF6: Stored Cross-Site Scripting via Improper Cache Sanitization in Winter CMS Custom Styles

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 21, 2026·6 min read·3 visits

Executive Summary (TL;DR)

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.

Vulnerability Overview

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.

Root Cause Analysis

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.

Code Analysis

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.

Exploitation Methodology

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.

Impact Assessment

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.

Detection and Mitigation Guidance

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.

Official Patches

Winter CMSOfficial patch fixing the raw cache retrieval bug in BrandSetting and EditorSetting.
Winter CMSWinter CMS v1.2.14 release page containing the fix.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.4/ 10
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H

Affected Systems

Winter CMS Core Engine (wintercms/winter)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Winter CMS
Winter CMS
< 1.2.141.2.14
AttributeDetail
CWE IDCWE-79
Secondary CWE IDCWE-524
Attack VectorNetwork
CVSS v3.1 Score8.4 (High)
Exploit StatusPoC / Regression Tested
KEV StatusNot Listed
Ransomware AssociationNo

MITRE ATT&CK Mapping

T1059.007Command and Scripting Interpreter: JavaScript
Execution
T1566Phishing / User Execution
Initial Access
T1189Drive-by Compromise
Initial Access
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Known Exploits & Detection

GitHub Security AdvisoryDetailed description of the exploitation process including code-level test cases in the official advisory repository.

Vulnerability Timeline

Vulnerability patched by Winter CMS maintainers
2026-08-12
Winter CMS Version 1.2.14 released
2026-08-12
GitHub Advisory GHSA-5CWR-5JXG-PCF6 published
2026-08-12

References & Sources

  • [1]GitHub Advisory Database GHSA-5CWR-5JXG-PCF6
  • [2]Fix Commit on Winter CMS Repository

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 2 hours ago•GHSA-P2CH-C2C3-4XM5
8.8

GHSA-P2CH-C2C3-4XM5: Cross-Site Request Forgery in Winter CMS AJAX Routing

Winter CMS contains a routing bypass vulnerability that allows Cross-Site Request Forgery (CSRF) attacks to trigger administrative AJAX handlers. Due to case-insensitivity in PHP's method resolution and an insufficiently strict check in the backend controller system, an attacker can invoke these handler methods through lowercase HTTP GET requests, bypassing default CSRF token validation.

Amit Schendel
Amit Schendel
2 views•4 min read
•about 3 hours ago•GHSA-HQ84-X37P-J6Q5
6.1

GHSA-HQ84-X37P-J6Q5: Reflected Cross-Site Scripting in Winter CMS Backend Table Widget

A reflected Cross-Site Scripting (XSS) vulnerability exists in the backend Table widget of Winter CMS. The vulnerability is located within the search input template partial, where the application retrieves raw user inputs from the query parameters and renders them directly inside a raw-text script container without sanitization. An attacker can exploit this behavior by passing a crafted tag containing raw-text terminators, leading to code execution in the context of the victim's session.

Amit Schendel
Amit Schendel
3 views•5 min read
•about 4 hours ago•GHSA-92HV-J533-69WC
3.7

GHSA-92HV-J533-69WC: Information Disclosure via ETag Conditional Matching in Wagtail CMS

An information disclosure vulnerability in the document serving subsystem of Wagtail CMS allows unauthorized users to verify if private documents match guessed SHA-1 hashes due to improper order of authentication checks.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 5 hours ago•GHSA-C2XX-CJMH-9Q8F
5.3

GHSA-C2XX-CJMH-9Q8F: Information Disclosure via Inherited Collection View Restriction Bypass in Wagtail API v2

An improper access control vulnerability in Wagtail's Documents and Images API V2 allows unauthenticated remote attackers to retrieve metadata (including titles and filenames) of files residing inside descendant collections of private parent collections, bypassing inherited view restrictions.

Amit Schendel
Amit Schendel
2 views•6 min read
•about 6 hours ago•GHSA-X5CX-W6P2-MXF2
6.5

GHSA-X5CX-W6P2-MXF2: Improper Permission Handling in Wagtail Snippet Copy Functionality

An authorization bypass vulnerability in Wagtail CMS allows authenticated users with snippet creation privileges ('add') to access and view the contents of restricted snippet instances for which they lack viewing or editing permissions. By invoking the copy endpoint, the application pre-populates form data with the properties of the source snippet, exposing sensitive information to unauthorized users.

Alon Barad
Alon Barad
4 views•6 min read
•about 11 hours ago•GHSA-JM5P-837G-RV8G
6.5

GHSA-JM5P-837G-RV8G: Insecure Direct Object Reference (IDOR) in Wagtail Page Translation Endpoint

An authenticated user with global translation permissions can exploit a missing authorization check on the page translation endpoint in Wagtail CMS. This allows the attacker to copy and view pages they do not have explicit edit or explore access to.

Alon Barad
Alon Barad
4 views•7 min read