Skip to content
Path traversal Advisory Intermediate CVE-2020-7647

GHSL-2020-073: Path traversal in Jooby - CVE-2020-7647

Jooby's asset handler falls back to searching the classpath when a requested file is not found in the configured base directory, allowing an attacker to access arbitrary classpath resources such as configuration files and compiled classes.

Alvaro Muñoz Follow

Originally disclosed on GitHub Security Lab

A Path Traversal vulnerability was identified in Jooby which allows an attacker to access arbitrary classpath resources including .properties and .class files.

pwntester, on GitHub Security Lab

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 report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could read arbitrary classpath resources, leading to information disclosure of configuration files and application class files.

What the attacker needed

Jooby application serving assets from a file system…

The fix

The issue was fixed in versions 1.6.7 and 2.8.2.

How it was found

  1. Configure Jooby to serve a file system directory, e.g. assets("/static/**", Paths.get("static")).
  2. Send a request for a path that does not exist in the base directory, such as /static/WEB-INF/web.xml.
  3. Jooby fails to find the file in the base directory and falls back to the classpath, returning the contents of the requested classpath resource.

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 report has not been written yet. The Original tab links to the source.

When a web server serves static files, it should only look inside the folder it was told to use. In this case, if the file wasn't there, the server also looked inside its own application files (the classpath), which can contain sensitive configuration and code. An attacker could request special paths to read those files.

What is Path traversal?

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

More by Alvaro Muñoz

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

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.