VORANT. Threat Intelligence Sign in Get the full feed

Ghostcat flaw in Apache Tomcat AJP exploited

high vulnerability technologygovernment-national

A file-inclusion vulnerability in Apache Tomcat's AJP protocol has public exploit code and can lead to arbitrary file read or remote code execution.

The Information-technology Promotion Agency (IPA) of Japan issued an alert regarding a vulnerability in Apache Tomcat, the servlet container developed under the Apache Software Foundation's Jakarta project. The flaw, related to how Tomcat processes AJP (Apache JServ Protocol) requests, allows a malicious actor to send crafted AJP requests to read arbitrary files located within the web application's root directory, including sensitive configuration files and source code.

In environments where the affected web application permits file upload or file storage functionality, this file-read primitive can be escalated by an attacker to achieve remote code execution. IPA notes that proof-of-concept exploit code for this vulnerability has already been publicly disclosed, increasing the likelihood of widespread exploitation attempts. Organizations running affected Tomcat versions are urged to apply vendor-supplied patches immediately, with version-specific remediation guidance available through IPA's security center.

This issue corresponds to what is publicly known as the Ghostcat vulnerability (CVE-2020-1938), affecting the Tomcat AJP connector. Given the widespread deployment of Apache Tomcat across enterprise and government web infrastructure, and the availability of public exploit code at the time of disclosure, prompt patching was strongly advised.

Mentioned in this report

Vulnerabilities CVE-2020-1938KEV

Detection guidance

Suspicious External Connection to Tomcat AJP Connector Port (Possible Ghostcat CVE-2020-1938 Exploitation)

ATT&CK T1190

Detects network connections to the Tomcat AJP connector port (8009) originating from remote/non-loopback hosts, which is unusual since AJP is intended for internal reverse-proxy communication and its exposure enables Ghostcat file-read/RCE exploitation. Auto-generated starting point — validate and tune in your environment before deploying. IOC matches can false-positive on shared infrastructure and decay as adversary infrastructure rotates.

title: Suspicious External Connection to Tomcat AJP Connector Port
logsource:
  category: network_connection
  product: windows
detection:
  selection:
    DestinationPort: 8009
  filter_local:
    DestinationIp|startswith:
    - '127.'
    - '10.'
    - 172.16.
    - 172.17.
    - 172.18.
    - 172.19.
    - 172.20.
    - 172.21.
    - 172.22.
    - 172.23.
    - 172.24.
    - 172.25.
    - 172.26.
    - 172.27.
    - 172.28.
    - 172.29.
    - 172.30.
    - 172.31.
    - 192.168.
  condition: selection and not filter_local
falsepositives:
- Legitimate internal reverse proxy (e.g. mod_jk, mod_proxy_ajp) connecting to Tomcat
  over AJP from within the trusted network segment
- Load balancer health checks configured to use the AJP port internally
level: medium
tags:
- attack.t1190
- attack.initial_access
id: 8687f994-2059-5fcf-a3c1-f79801f9384b
status: experimental
author: Vorant

Tomcat Java Process Spawning Command Shell (Possible Ghostcat Post-Exploitation)

ATT&CK T1005

Detects a Tomcat/Catalina Java process spawning a command interpreter or scripting engine, consistent with post-exploitation activity after leveraging the Ghostcat AJP file-read primitive (CVE-2020-1938) combined with file-upload functionality to achieve remote code execution and access local files. Auto-generated starting point — validate and tune in your environment before deploying. IOC matches can false-positive on shared infrastructure and decay as adversary infrastructure rotates.

title: Tomcat Process Spawning Command Shell
logsource:
  category: process_creation
  product: windows
detection:
  selection_parent:
    ParentImage|endswith:
    - \java.exe
    - \javaw.exe
    ParentCommandLine|contains:
    - catalina
    - Tomcat
  selection_child:
    Image|endswith:
    - \cmd.exe
    - \powershell.exe
    - \wscript.exe
    - \cscript.exe
    - \bash.exe
    - \sh.exe
  condition: selection_parent and selection_child
falsepositives:
- Administrative scripts intentionally invoked by Tomcat management scripts or deployment
  automation
- Custom Tomcat servlets that legitimately shell out to OS utilities for reporting
  or maintenance tasks
level: high
tags:
- attack.t1005
- attack.execution
- attack.t1190
id: 49d009e2-bbcc-53bf-818a-a7d5d620e6c4
status: experimental
author: Vorant

Behavioural rules are generated from public reporting — validate in your environment before deploying.

Source reporting: https://www.ipa.go.jp/archive/security/security-alert/2019/alert20200225.html

This is the public brief

Subscribers see the full picture: extracted IOCs, ready-to-deploy detections (Sigma, Splunk, KQL, Elastic, YARA, Suricata), the entity graph, TAXII 2.1 feed and real-time alerts matched to your sectors.

Start free