In April 2025, ReliaQuest identified a potential new vulnerability in SAP NetWeaver, allowing attackers to upload and execute JSP webshells via the /metadatauploader endpoint. Despite patched environments, adversaries achieved remote code execution, suggesting an unreported RFI vulnerability. Advanced tools like Brute Ratel and Heaven’s Gate were used for persistence and evasion. This exploitation poses a critical threat to enterprises and government systems running SAP.
The vulnerability uncovered in SAP NetWeaver centers on the /developmentserver/metadatauploader endpoint, which is intended to handle metadata files for application development. ReliaQuest found that this endpoint could be exploited to upload malicious JSP webshells to a publicly accessible directory (/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/root/) without authentication or proper input validation. Once uploaded, these webshells could be remotely executed via simple HTTP GET requests, enabling full remote code execution on the target system. Despite affected systems being fully patched, attackers bypassed protections—suggesting the presence of an unreported Remote File Inclusion (RFI) vulnerability or a variant of the previously known CVE-2017-9844. The endpoint’s insecure design, coupled with the ability to execute uploaded files, made it a potent vector for persistent exploitation and full system compromise.
The vulnerability stems from insufficient input validation and access control in the metadatauploader endpoint, which is designed for uploading metadata (configuration files, serialized objects) for application development.Key Flaws:o The endpoint allows arbitrary file uploads via HTTP POST without proper authentication or sanitization.o Uploaded files are saved directly to a publicly accessible web directory, enabling remote execution.o JSP files (e.g., helper.jsp, cache.jsp) uploaded this way act as webshells capable of executing commands on the server.
Initial Access:o Attacker sends a crafted POST request to the vulnerable endpoint with a malicious .jsp payload.
Webshell Placement:o Payloads are written to /j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/root/o Common file names: helper.jsp, cache.jsp.
Remote Execution:o Attacker sends a GET request to the URL hosting the JSP file.o Webshells execute attacker-controlled system commands via a simple web interface.
Persistence:o Files persist on disk and offer long-term remote access if undetected.
Enjoyed reading this Threat Intelligence Advisory? Stay updated with our latest exclusive content by following us on Twitter and LinkedIn.
No related posts found.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
This website uses the following additional cookies:
(List the cookies that you are using on the website here.)
More information about our Cookie Policy