CVE-2025-31324
SAP NetWeaver Visual Composer — Unauthenticated File Upload → Remote Code Execution
Impact: Unauthenticated file upload to SAP NetWeaver AS Java's Visual Composer endpoint enables webshell deployment and full OS-level code execution. Actively exploited by nation-state threat actors as a zero-day before patch release. Any internet-exposed SAP NetWeaver AS Java system must be treated as potentially compromised. Patch: SAP Security Note 3594142.
Step-by-Step Fix Runbook
# Check SAP NetWeaver version and Visual Composer status # Via SAP GUI: transaction SM51 → check active application servers # Via browser: https://<SAP_HOST>:8000/developmentserver/metadatauploader # If this URL responds (200 OK) — YOU ARE VULNERABLE AND MUST ACT NOW # Check SAP kernel version: # Transaction: SYSTEM → Status → SAP System Data # Or via command line on SAP host: disp+work -version # Affected versions: # SAP NetWeaver AS Java 7.50 (any SP) # SAP NetWeaver AS Java 7.40 and earlier # Any SAP system with Visual Composer component installed and active # Check if exploit already hit your system: # Look for suspicious JSP/ASPX webshells in Visual Composer directory: find /usr/sap/*/SYS/global -name "*.jsp" -newer /tmp -mtime -30 2>/dev/null find /usr/sap/ -path "*/developmentserver/*" -name "*.jsp" -mtime -30 2>/dev/null find /usr/sap/ -path "*/developmentserver/*" -name "*.war" -mtime -30 2>/dev/null
# IMMEDIATE: block the vulnerable endpoint at your reverse proxy/WAF
# before applying SAP patch (can be done in minutes)
# Nginx — block Visual Composer upload endpoint:
location /developmentserver/metadatauploader {
deny all;
return 403;
}
location ~ /developmentserver/ {
deny all;
return 403;
}
# Apache HTTP Server:
<Location "/developmentserver">
Order deny,allow
Deny from all
</Location>
# Check if blocked successfully:
curl -I https://<SAP_HOST>/developmentserver/metadatauploader
# Should return 403, not 200
# Also block at network level (iptables) if no reverse proxy:
iptables -I INPUT -p tcp --dport 8000 -s 0.0.0.0/0 -j DROP
iptables -I INPUT -p tcp --dport 8000 -s 10.0.0.0/8 -j ACCEPT # Allow internal only
iptables -I INPUT -p tcp --dport 8000 -s 192.168.0.0/16 -j ACCEPT# SAP Security Note 3594142 — released April 2025 # Download from: https://support.sap.com/en/my-support/knowledge-base/security-notes.html # Note ID: 3594142 # Patch installation via SAP Update Manager (SUM): # 1. Download patch from SAP Service Marketplace (S-user required) # 2. Extract to /tmp/sap-patch/ # 3. Start SUM: cd /usr/sap/SUM ./STARTUP # Or apply via JSPM (Java Support Package Manager) for older systems: # Transaction: JSPM # Import queue → add SAP Security Note 3594142 → run # Verify patch applied: # Transaction: SNOTE → search 3594142 → status should show "Implemented" # If patching is not immediately possible: # Alternative: completely disable Visual Composer service via SAP Management Console # SAP NetWeaver Administrator → System Management → Services # Find: developmentserver → Stop service # This removes the attack surface without system downtime
# Scan for webshells uploaded via CVE-2025-31324
# Attackers typically upload JSP webshells to the Visual Composer directory
# Find recently modified files in SAP web directories:
find /usr/sap -name "*.jsp" -newer /usr/sap/kernel -mtime -90 2>/dev/null |
xargs grep -l "Runtime.exec|ProcessBuilder|getRuntime|cmd.exe|/bin/sh" 2>/dev/null
# Check for known webshell patterns in all JSP files:
find /usr/sap -name "*.jsp" 2>/dev/null | while read f; do
if grep -qE "Runtime.exec|ProcessBuilder|getRuntime|exec(" "$f" 2>/dev/null; then
echo "SUSPICIOUS: $f"
ls -la "$f"
fi
done
# Known IoC file paths reported in threat intel:
# /usr/sap/<SID>/J<instance>/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/root/*.jsp
# /usr/sap/<SID>/SYS/global/security/lib/tools/*.jsp
# Network IoCs: unusual outbound connections from SAP host
netstat -tlnp | grep java
# Look for unexpected listening ports or connections to external IPs
# Check SAP access logs for exploitation:
grep "metadatauploader" /usr/sap/*/SYS/global/security/audit/*.log
grep "developmentserver" /usr/sap/*/SYS/global/security/audit/*.log |
grep -v "403|404" # Filter: show only successful accesses# SAP NetWeaver hardening after patching # 1. Restrict SAP ICM (Internet Communication Manager) to necessary paths only # Transaction: SICF — disable unused services # Disable: /sap/bc/webdynpro/sap/dswpgm/* (if not needed) # Disable: /developmentserver/* (should be disabled post-patch too) # 2. SAP Web Dispatcher hardening: # Whitelist only required URL paths in SAP Web Dispatcher profile: # icm/HTTP/file_access_0 = PREFIX=/,DOCROOT=/usr/sap/webdisp/htdocs/,AUTHFILE=... # Block all non-application URLs at dispatcher level # 3. Enable SAP Security Audit Log (Transaction SM19): # Audit: Failed logons, RFC calls, transaction starts # Forward to SIEM via SAP Enterprise Threat Detection or Splunk SAP connector # 4. Network segmentation: # SAP application servers should NOT be directly internet-accessible # All external access via SAP Web Dispatcher (reverse proxy) # SAP Web Dispatcher in DMZ, application servers in internal network # 5. Regular SAP patch cadence: # Subscribe to SAP Security Patch Day (second Tuesday of each month) # Target: patch critical SAP notes within 72 hours of release # Use SAP Solution Manager or Focused Run for automated patch compliance tracking
Frequently Asked Questions
What is SAP NetWeaver Visual Composer and why is it a critical attack surface?
SAP NetWeaver Visual Composer is a browser-based development tool for creating SAP composite applications without traditional coding. It includes a metadata upload endpoint (/developmentserver/metadatauploader) that allows uploading application artifacts. The vulnerability: this upload endpoint does not require authentication — any unauthenticated HTTP request can upload arbitrary files. By uploading a JSP webshell to a path served by the SAP Java Application Server, an attacker achieves unauthenticated remote code execution as the SAP service account (typically with OS-level privileges). Why critical: SAP NetWeaver hosts mission-critical business systems (ERP, HR, Finance) with access to the entire organization's most sensitive data. SYSTEM/OS-level access on an SAP server typically enables: complete ERP data exfiltration, financial fraud, supply chain manipulation, and lateral movement throughout the corporate network.
Was CVE-2025-31324 exploited before the patch was released?
Yes — CVE-2025-31324 was a zero-day vulnerability with confirmed exploitation before SAP released Security Note 3594142. Observed exploitation: nation-state affiliated threat actors (attributed to groups associated with China-nexus espionage) were observed exploiting the vulnerability in April 2025. Attack chains observed: 1) Unauthenticated file upload of JSP webshell. 2) Webshell used to establish persistent access. 3) Credential harvesting from SAP system. 4) Lateral movement using harvested SAP credentials. 5) Data exfiltration from ERP (financial data, employee data, IP). The exploitation was reported by Mandiant/Google Threat Intelligence and watchTowr. Any SAP NetWeaver system with an internet-exposed Visual Composer endpoint should be treated as potentially compromised prior to patching and investigated for IoCs.
How do I check if my SAP system was already compromised?
Indicators of compromise (IoC) checklist: File system: new JSP files in SAP web directories modified in the past 90 days (see Step 4 commands). Any file in /developmentserver/ paths that wasn't there before April 2025. Network: unusual outbound connections from SAP application server to external IPs (not in your expected vendor/SAP update server list). Unexpected listening ports on the SAP host. Log analysis: HTTP 200 responses to /developmentserver/metadatauploader — indicates successful upload. POST requests to newly created JSP paths — indicates webshell execution. SAP Security Audit Log: unexpected SYSTEM/privileged account activity, mass data exports, RFC calls from unusual source IPs. If any IoC is found: treat the system as compromised, engage incident response, do NOT just patch and continue (attacker may have persistence via other means).
Does this affect SAP S/4HANA and SAP BTP?
CVE-2025-31324 specifically affects SAP NetWeaver AS Java with the Visual Composer component. Clarification on affected/not affected products: Affected: SAP NetWeaver AS Java 7.50 (standalone or as part of older SAP suites), any SAP system built on NetWeaver AS Java with Visual Composer enabled. Not directly affected: SAP S/4HANA (runs on ABAP stack, not AS Java) — but may have AS Java components alongside. SAP BTP (Business Technology Platform) — cloud-managed by SAP, patched by SAP. SAP ECC (primarily ABAP stack). Important: many organizations run hybrid landscapes where NetWeaver AS Java coexists with ABAP systems. Even if S/4HANA itself is not affected, a compromised AS Java system in the same network can be used for lateral movement to the ABAP/S4H systems. Audit your entire SAP landscape for AS Java components.