CVE-2020-1938criticalunder attack

CVE-2020-1938: critical vulnerability in Apache Tomcat

Published · Updated

E-mail alert when it lands in KEV, gets a public PoC or its score goes up.

100Vexday Risk Score

Patch now. It under exploitation confirmed by CISA and has a working public exploit.

ssvc Actcvss 9.8epss 99%
from disclosure to weaponsame day
Published on NVDFeb 24
1st PoCJun 6
metasploitFeb 20
CISA KEV+738d
What the vendors declare (VEX)

Official vendor statements in CSAF/VEX format: whether their product is affected, already fixed, or ruled out — and why. These are the vendor's assertions, not Vexday's judgment.

Affected
4 products (5 components)
Red Hat OpenStack Platform 13 (Queens) · Red Hat Enterprise Linux 5 · Red Hat JBoss Data Grid 6 · Red Hat OpenStack Platform 10 (Newton)
workaround: Please refer to the Red Hat knowledgebase article: https://access.redhat.com/solutions/4851251
Fixed
34 products (825 components)
Red Hat JBoss Enterprise Application Platform 6.4 for RHEL 5 Server · Red Hat JBoss Enterprise Application Platform 6.4 for RHEL 6 Server · Red Hat JBoss Enterprise Application Platform 6.4 for RHEL 7 Server · Red Hat Enterprise Linux AppStream (v. 8) · Red Hat JBoss Web Server 3.1 for RHEL 6 · and others 29
Not affected
5 products (9 components) — because the vulnerable code is not present in the product
Red Hat Software Collections · Red Hat Decision Manager 7 · Red Hat JBoss Data Virtualization 6 · Red Hat JBoss Fuse 6 · Red Hat Process Automation 7
Action required by CISAfederal deadline: 2022-03-17

Apply updates per vendor instructions.

In short

Apache Tomcat's AJP protocol connector was enabled by default and trusted too much, allowing attackers to read any file from the web application or execute code by treating files as JSP scripts if they could access this connector.

Technical detail

The AJP Connector in Tomcat 9.0.0.M1-9.0.0.30, 8.5.0-8.5.50, and 7.0.0-7.0.99 was enabled by default on all interfaces with insufficient input validation. An attacker with network access to the AJP port can exploit request smuggling or path traversal to retrieve arbitrary files or execute arbitrary JSP code, leading to remote code execution if combined with file upload capabilities.

Summary generated and translated by AI from the official description.

The full analysis of this CVE is available in Portuguese →

When using the Apache JServ Protocol (AJP), care must be taken when trusting incoming connections to Apache Tomcat. Tomcat treats AJP connections as having higher trust than, for example, a similar HTTP connection. If such connections are available to an attacker, they can be exploited in ways that may be surprising. In Apache Tomcat 9.0.0.M1 to 9.0.0.30, 8.5.0 to 8.5.50 and 7.0.0 to 7.0.99, Tomcat shipped with an AJP Connector enabled by default that listened on all configured IP addresses. It was expected (and recommended in the security guide) that this Connector would be disabled if not required. This vulnerability report identified a mechanism that allowed: - returning arbitrary files from anywhere in the web application - processing any file in the web application as a JSP Further, if the web application allowed file upload and stored those files within the web application (or the attacker was able to control the content of the web application by some other means) then this, along with the ability to process a file as a JSP, made remote code execution possible. It is important to note that mitigation is only required if an AJP port is accessible to untrusted users. Users wishing to take a defence-in-depth approach and block the vector that permits returning arbitrary files and execution as JSP may upgrade to Apache Tomcat 9.0.31, 8.5.51 or 7.0.100 or later. A number of changes were made to the default AJP Connector configuration in 9.0.31 to harden the default configuration. It is likely that users upgrading to 9.0.31, 8.5.51 or 7.0.100 or later will need to make small changes to their configurations.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected products
Apache · Apache Tomcat
public PoCs found — 43✓ VexDay Proof
exploitdb✓ VexDay Proofwww.exploit-db.com/exploits/49039exploitdbwww.exploit-db.com/exploits/48143unverifiedgithubgithub.com/00theway/Ghostcat-CNVD-2020-10487★ 424githubgithub.com/lizhianyuguangming/TomcatScanPro★ 301githubgithub.com/bkfish/CNVD-2020-10487-Tomcat-Ajp-lfi-Scanner★ 294githubgithub.com/tpt11fb/AttackTomcat★ 259githubgithub.com/sv3nbeast/CVE-2020-1938-Tomact-file_include-file_read★ 57githubgithub.com/xindongzhuaizhuai/CVE-2020-1938★ 45githubgithub.com/laolisafe/CVE-2020-1938★ 38githubgithub.com/Hancheng-Lei/Hacking-Vulnerability-CVE-2020-1938-Ghostcat★ 24githubgithub.com/woaiqiukui/CVE-2020-1938TomcatAjpScanner★ 15githubgithub.com/fairyming/CVE-2020-1938★ 11githubgithub.com/dacade/CVE-2020-1938★ 9githubgithub.com/doggycheng/CNVD-2020-10487★ 8githubgithub.com/fatal0/tomcat-cve-2020-1938-check★ 7githubgithub.com/w4fz5uck5/CVE-2020-1938-Clean-Version★ 6githubgithub.com/YounesTasra-R4z3rSw0rd/CVE-2020-1938★ 3githubgithub.com/sgdream/CVE-2020-1938★ 3githubgithub.com/delsadan/CNVD-2020-10487-Bulk-verification★ 3githubgithub.com/Just1ceP4rtn3r/CVE-2020-1938-Tool★ 3githubgithub.com/h7hac9/CVE-2020-1938★ 2githubgithub.com/Warelock/cve-2020-1938★ 2githubgithub.com/With-fate/CVE-2020-1938★ 1githubgithub.com/Neko-chanQwQ/CVE-2020-1938★ 1githubgithub.com/jptr218/ghostcat★ 1githubgithub.com/streghstreek/CVE-2020-1938★ 1githubgithub.com/shaunmclernon/ghostcat-verification★ 1githubgithub.com/abrewer251/CVE-2020-1938_Ghostcat-PoC★ 0githubgithub.com/duckpigdog/Tomcat-AJP-CVE-2020-1938★ 0githubgithub.com/CyberCTF/vulhub-tomcat-cve-2020-1938★ 0githubgithub.com/Mohammad-Anon/CVE-2020-1938★ 0githubgithub.com/sangrok-jeon/CVE-2020-1938-Tomcat-AJP-Ghostcat--Analysis★ 0githubgithub.com/cyberguardsec101-sketch/ghostcat★ 0githubgithub.com/I-Runtime-Error/CVE-2020-1938★ 0githubgithub.com/RedTeam-Rediron/CVE-2020-1938★ 0githubgithub.com/Umesh2807/Ghostcat★ 0githubgithub.com/si1ence90/Ghostcat-Tomcat-AJP-Exploit-Py3★ 0githubgithub.com/aidilzlkfli/Scanning★ 0githubgithub.com/MateoSec/ghostcatch★ 0githubgithub.com/lem0n817/tomcatfileread★ 0githubgithub.com/hopsypopsy8/CVE-2020-1938-Exploitation★ 0githubgithub.com/acodervic/CVE-2020-1938-MSF-MODULE★ 0githubgithub.com/whatboxapp/GhostCat-LFI-exp★ 0
⚠ Public resources, to assess the exposure of systems you control or are authorized to test. Test only with authorization.