Skip to content
Path traversal Write-up Intermediate

CVE-2020-1938: Ghostcat

Apache Tomcat's default AJP connector on port 8009 was vulnerable to a file read and inclusion flaw, allowing an attacker to disclose configuration and source code files of deployed web applications and potentially achieve code execution.

reddit.com

Published on reddit.com

We focus on technical intelligence, research and engineering to help operational [blue|purple] teams defend their estates and have awareness of the world.

The author, on reddit.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the AJP connector was enabled by default and did not properly restrict which files could be requested, allowing path traversal and file inclusion.

Impact

An attacker could read configuration and source code files of all deployed web applications and potentially execute code.

What the attacker needed

AJP connector on port 8009 reachable

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Apache Tomcat is a web server that runs Java applications. It had a feature called AJP on port 8009 that was turned on by default and let outsiders ask it to read files on the server. An attacker could use that to read sensitive files and possibly run their own code.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.