Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Apache-Tomcat-CVE-2020-9484 — Analysis of CVE-2020-9484 in Apache Tomcat: patch diff review, lab setup with PersistentManager/FileStore, and JDWP debugging to trace the session path traversal to deserialization RCE. | Kitploit
Tools/GitHubGitHub/crieheiki/apache-tomcat-cve-2020-9484
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationDebuggersWeb SecurityPapers & ResearchLearning & EducationLabs & Practice
GitHubcrieheiki/apache-tomcat-cve-2020-9484

Apache-Tomcat-CVE-2020-9484

Analysis of CVE-2020-9484 in Apache Tomcat: patch diff review, lab setup with PersistentManager/FileStore, and JDWP debugging to trace the session path traversal to deserialization RCE.

Dec 4, 2026Not yet reviewed
View Repository

Related Tools

  • nuclei

    Fast YAML-based vulnerability scanner with template-driven detection engine for automated security testing across web apps, APIs, networks, DNS, and cloud infrastructure.

  • zaproxy

    Open-source web application security scanner for automated vulnerability detection, manual penetration testing, and API security testing with a proxy-based interception engine.

  • openvas-scanner

    This repository contains the scanner component for Greenbone Community Edition.

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    745
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    IMSI Catcher platform that deploys a rogue GSM cell to intercept SMS, inject messages and track mobile devices

    732
  • 3

    Callisto

    jetp1ane/callisto

    Automated binary vulnerability analysis tool that decompiles executables via Ghidra, scans pseudo-C code with Semgrep, and validates findings using GPT-3.5-Turbo to reduce false positives.

    610
  • 4

    opencti

    opencti-platform/opencti

    Open Cyber Threat Intelligence Platform

    546
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    414
  • 6

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

    413

Explore all tools

Browse our collection of tools

View all tools →
Share

Apache-Tomcat-CVE-2020-9484

Introduction

CVE-2020-9484 is a security vulnerability belonging to the Insecure Deserialization class, present in Apache Tomcat's session persistence mechanism. This vulnerability can allow an attacker to achieve Remote Code Execution (RCE) under certain conditions.

The affected Apache Tomcat versions include:

  • Apache Tomcat 10.0.0-M1 to 10.0.0-M4
  • Apache Tomcat 9.0.0.M1 to 9.0.34
  • Apache Tomcat 8.5.0 to 8.5.54
  • Apache Tomcat 7.0.0 to 7.0.103

To successfully exploit the vulnerability, the following conditions must be met simultaneously:

  • The attacker is able to control the content and name of a file that exists on the server (for example, through a File Upload feature that is not strictly validated).
  • The server is configured to use PersistentManager in combination with FileStore.
  • PersistentManager is configured with sessionAttributeValueClassNameFilter="null" or a filter loose enough to allow deserialization of attacker-supplied objects.
  • The attacker knows the relative path from the FileStore session storage directory to the file controlled by the attacker.

The root cause of CVE-2020-9484 lies in the fact that FileStore uses the client-controlled Session ID to construct the path to the session file without fully validating the storage directory boundary. When PersistentManager attempts to restore a session that does not exist in memory, an attacker can leverage Path Traversal to cause Tomcat to read and deserialize a malicious file located outside the session-store, thereby leading to RCE if the exploitation conditions are met.

Patch Analysis

The CVE-2020-9484 patch adds a file path validation mechanism in the file(String id) method of the FileStore class.

private File file(String id) throws IOException {
-    if (this.directory == null) {
+    File storageDir = directory();
+    if (storageDir == null) {
         return null;
     }

     String filename = id + FILE_EXT;
-    File file = new File(directory(), filename);
+    File file = new File(storageDir, filename);
+
+    // Check the file is within the storage directory
+    if (!file.getCanonicalPath().startsWith(storageDir.getCanonicalPath())) {
+        log.warn(sm.getString("fileStore.invalid", file.getPath(), id));
+        return null;
+    }

     return file;
}

Before being patched, FileStore.file(String id) used the Session ID directly to construct the path to the session file without checking whether the resulting path still resided within the storage directory. This allowed an attacker to use Path Traversal to access files outside the session-store.

To fix this, the patch adds a comparison of file.getCanonicalPath() with storageDir.getCanonicalPath(). If the file path does not start with the storage directory path, the method logs a warning and returns null.

Thus, the patch aims to prevent the Session ID from being used to reference files located outside the session storage directory.

Environment Setup

To analyze CVE-2020-9484, I built a test environment using Apache Tomcat 9.0.34, a version affected by the vulnerability. The environment was deployed on an Ubuntu Server virtual machine via VirtualBox, while a Windows 11 machine served to send HTTP requests and perform remote debugging with IntelliJ IDEA.

The components used in the test environment include:

ComponentConfiguration
Host OSWindows 11
VirtualizationVirtualBox
Guest OSUbuntu Server
Apache Tomcat9.0.34
JavaEclipse Temurin JDK 8u514
Build ToolApache Ant 1.10.18
DebuggerIntelliJ IDEA
NetworkNAT + Host-only
Target IP192.168.56.103
HTTP Port8080
Debug Port5005

1. Apache Tomcat Configuration

Apache Tomcat 9.0.34 was compiled directly from source code using Apache Ant to support source code analysis and breakpoint setting.

Tomcat is configured with two paths:

  • CATALINA_HOME=/opt/tomcat-lab/runtime/build
  • CATALINA_BASE=/opt/tomcat-lab/instance/cve-2020-9484

To meet the exploitation conditions for CVE-2020-9484, Tomcat is configured to use PersistentManager in combination with FileStore instead of the default session management mechanism.

The session storage directory is set at:

/opt/tomcat-lab/instance/cve-2020-9484/session-store

In addition, I deployed a simple web application named session-lab, accessible at:

http://192.168.56.103:8080/session-lab/

This application supports two functions:

  • action=set: Creates or accesses a session and stores a value in a session attribute.
  • action=read: Accesses an existing session and reads the stored session attribute value.

The application is used to generate HTTP requests for observing the session handling process inside Tomcat.

2. Attacker-Controlled File

Outside Tomcat's session storage directory, I planned to create a separate directory on the Ubuntu Server to hold a file named exploit.session.

For example, the directory structure in the lab is as follows:

/opt/tomcat-lab/
├── runtime/
│   └── build/
├── instance/
│   └── cve-2020-9484/
│       ├── conf/
│       ├── logs/
│       ├── webapps/
│       ├── work/
│       └── session-store/
└── attacker-files/
    └── exploit.session

Where:

  • session-store/: The directory configured in FileStore for storing application sessions.
  • attacker-files/: A separate directory simulating a location where an attacker could potentially control file contents on the system.
  • exploit.session: A file prepared to simulate attacker-controlled data, for researching deserialization behavior.

In this scenario, I assume the attacker already has the ability to place a file with a controlled name and content onto the server's filesystem, and that the file can be read by the Tomcat process. The process of uploading or writing the file to the server is outside the scope of the test.

Unlike the session files normally stored by Tomcat, exploit.session is placed outside the session-store directory. The purpose of this arrangement is to test whether a client-supplied Session ID can cause Tomcat to access a file located outside the configured session storage directory.

3. Remote Debugging

To monitor the execution process, Tomcat is started with Java Debug Wire Protocol (JDWP), using port 5005 on the Ubuntu Server.

The Windows machine connects to the debugger through an SSH tunnel, forwarding port 127.0.0.1:5005 on Windows to the JDWP port of the virtual machine.

Then, IntelliJ IDEA is configured with Remote JVM Debug to connect to the running Tomcat process.

With this environment, I can send HTTP requests from Windows to the session-lab application, while using breakpoints in IntelliJ IDEA to observe how Tomcat processes the Session ID and interacts with session files on the filesystem.

In particular, the separately placed exploit.session file serves the process of examining and identifying the root cause of CVE-2020-9484 in the Debugging & Root Cause Analysis section.

Understanding Session Persistence

CoyoteAdapter is the intermediary component between the HTTP protocol handling layer (Coyote) and the Servlet Container layer (Catalina) of Apache Tomcat. This class is responsible for preparing the HTTP request before it is passed into the Servlet Container's processing.

During request processing, the postParseRequest() method is responsible for determining the Session ID supplied by the client through the configured session tracking mechanisms, such as URL, Cookie, or SSL.

After the Session ID is extracted, this value is stored in the requestedSessionId attribute of the Request object. However, this does not mean that the corresponding session already exists or is valid.

When the application requests access to a session, Tomcat uses the doGetSession(boolean create) method in the Request class to look up or create a session.

Download Tool