Skip to content
KitploitKITPLOIT
ИнструментыЭксплойтыБлог
Log in
Отправить
ИнструментыЭксплойтыБлог
Отправить

Инструменты для хакинга, пентеста и кибербезопасности — ваш арсенал защиты!

Kitploit — это каталог инструментов для хакинга, кибербезопасности и пентестинга. Находите последние обновления проектов для поиска уязвимостей, анализа систем, автоматизации тестирования и усиления вашей безопасности.

ЛентыКонтактыКонфиденциальность© 2026 Kitploit

Каталог инструментов

Категории

Все категории
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
Инструменты/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.

Репозиторий
4 дек. 2026 г.Ещё не проверено

Похожие инструменты

  • nuclei

    Быстрый сканер уязвимостей на основе YAML с шаблонным движком обнаружения для автоматизированного тестирования безопасности веб-приложений, API, сетей, DNS и облачной инфраструктуры.

  • zaproxy

    Сканер безопасности веб-приложений с открытым исходным кодом для автоматического обнаружения уязвимостей, ручного тестирования на проникновение и тестирования безопасности API с помощью прокси-движка перехвата.

  • openvas-scanner

Популярное

Смотреть все →

Откройте для себя самые используемые инструменты нашего сообщества.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # Приложение GhostLock с запуском в один клик (CVE-2026-43499)

    750
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    Платформа IMSI Catcher, разворачивающая поддельную соту GSM для перехвата SMS, внедрения сообщений и отслеживания мобильных устройств

    739
  • 3

    Callisto

    jetp1ane/callisto

    Автоматизированный инструмент анализа уязвимостей бинарных файлов, который декомпилирует исполняемые файлы с помощью Ghidra, сканирует псевдо-C код с помощью Semgrep и проверяет находки с использованием GPT-3.5-Turbo для уменьшения ложных срабатываний.

    585
  • 4

    opencti

    opencti-platform/opencti

    Открытая платформа киберразведки угроз

    550
  • 5

    DFRoot

    a2333c/dfroot

    Инструмент для получения root-прав на Android для Samsung Galaxy S25 Ultra (SM-S938B), который объединяет DirtyFrag CVE-2026-43284 и CVE-2026-43499 для автоматического получения root-прав при загрузке через KernelSU.

    414
  • 6

    ARTEX

    baarai/artex

    Платформа автономного тестирования на проникновение на основе мультиагентной LLM с агентами-планировщиками и агентами-исполнителями, графами активов и исследования, записью MITM-трафика и повторной проверкой уязвимостей.

    409

Изучить все инструменты

Просмотрите нашу коллекцию инструментов

Смотреть все инструменты →
Поделиться
Контент недоступен на запрошенном языке. Показываем английскую версию.

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.

Скачать инструмент

Этот репозиторий содержит компонент сканера для Greenbone Community Edition.