Summary
Winter CMS contains a stored cross-site scripting vulnerability in custom Markup Styles, which are compiled by the LESS parser and rendered without adequate sanitization. An authenticated backend user with the backend.manage_editor permission may be able to inject script content that executes when backend pages are viewed.
Affected context
The issue occurs in Winter CMS backend environments where users with the
backend.manage_editor permission can create or modify custom Markup Styles.
These styles are processed by the LESS parser and subsequently rendered across
backend pages without sufficient output sanitization. Risk depends on the
ability to create malicious styles and on other users viewing affected pages.
Exploit preconditions
- Attack surface: Winter CMS administrative backend
- Required access: An authenticated account with the
backend.manage_editorpermission - Trigger point: Creation or modification of a custom Markup Style followed by rendering of a backend page
- Why exploitation is possible: User-controlled style content is compiled and rendered without adequately neutralizing script-capable content
Why this happens
The vulnerability results from treating administrator-controlled Markup Style
content as trusted after processing it through the LESS parser. The resulting
content is rendered in backend pages without an appropriate context-aware
sanitization or output-encoding boundary. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as
cross-site scripting.
Potential impact
- Malicious script may execute in the browser of an authenticated backend user
- An attacker could perform actions available to the affected user's account
- Backend session information or other accessible data could be exposed
- Administrative workflows and displayed content could be manipulated
- The vulnerability could support follow-on compromise if a highly privileged user views the affected page
General mitigation guidance
Mitigation generally focuses on treating custom styles as untrusted input and
enforcing safe rendering boundaries.
Common defensive patterns include:
- Applying context-aware output encoding and sanitization before rendering styles
- Restricting accepted Markup Style syntax to a narrowly defined allowlist
- Separating legitimate stylesheet features from script-capable or markup-capable content
- Limiting the
backend.manage_editorpermission according to least privilege - Requiring review or approval for custom backend assets
- Using browser security controls such as a restrictive Content Security Policy where practical
- Preventing unsafe content from being rendered across all backend pages by default
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis of code paths that render user-controlled styles or markup
- Code review signals involving dynamic HTML or CSS generation without contextual encoding
- Tests that submit script-capable input through custom style management features
- Monitoring audit logs for unexpected Markup Style creation or modification
- Policy checks requiring allowlisted style syntax and security review for backend extensions
- Automated application security testing focused on stored input rendered in authenticated interfaces

