Summary
Winter CMS contains a stored cross-site scripting vulnerability in custom CSS entered through the Brand Settings Styles field. A backend user with the backend.manage_branding permission can supply content that is compiled and rendered without adequate sanitization, causing script execution when backend users visit affected pages.
Affected context
The issue affects Winter CMS installations using the Brand Settings Styles field to configure custom CSS. It becomes risky when a backend user has the backend.manage_branding permission, supplied content is processed by the LESS parser, and the resulting output is rendered on backend pages without sufficient sanitization or output encoding. Versions before the corrective release may be affected.
Exploit preconditions
- Attack surface: Winter CMS backend Brand Settings Styles field
- Required access: A backend account with the
backend.manage_brandingpermission, or another path to modify the relevant branding configuration - Trigger point: A backend user views a page where the stored branding styles are rendered
- Why exploitation is possible: User-controlled content is compiled and included in backend responses without reliably neutralizing executable browser content
Why this happens
The vulnerability results from treating administrator-supplied style content as trusted output after preprocessing with the LESS parser. When the generated content is rendered without context-appropriate sanitization or encoding, attacker-controlled markup or script-capable content may be interpreted by a backend user's browser. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), specifically a stored XSS condition.
Potential impact
- An attacker may execute script in the context of a backend user's session
- A malicious user could perform unauthorized actions available to the victim
- Session-related information or backend data could be exposed
- Administrative workflows could be modified or abused
- Additional compromise may occur if a highly privileged backend account is affected
General mitigation guidance
Mitigation generally focuses on ensuring that branding and style configuration cannot become an executable content channel.
Common defensive patterns include:
- Applying context-aware allowlisting and sanitization to custom style input
- Separating supported CSS declarations from arbitrary preprocessor features
- Encoding output for the exact rendering context before including it in backend pages
- Avoiding inline execution-capable content and enforcing restrictive browser security policies where practical
- Limiting branding permissions according to least privilege
- Treating backend-authored content as untrusted unless it passes validated, constrained processing
- Using a maintained release that contains the vendor's security correction
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis of templates and response generation for unsanitized configuration values
- Code review signals involving CSS, LESS, or other preprocessor output inserted into HTML responses
- Tests that submit metacharacters and verify that rendered backend pages do not interpret them as markup or script
- Review of permission assignments for branding and other content-management capabilities
- Content Security Policy reporting and monitoring for unexpected script activity in administrative interfaces
- Automated security testing or code review tools configured to identify stored XSS data flows

