Skip to content
Path traversal Write-up Intermediate

Path Traversal Vulnerability in Payara Platform

An incorrect validation of the request URL in Payara Platform allows a path traversal attack that can read configuration or source code files inside the WEB-INF and META-INF directories of a deployed web application. An attacker could access sensitive files that are normally protected.

Michael Baer Follow

Published on sec-consult.com

Due to an incorrect validation of the URL of a request in the Payara Software, a path traversal attack allows to read the configuration or source code files of a deployed web application in the WEB-INF and META-INF directories.

Michael Baer, on sec-consult.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

The server only checks whether the request path starts with '/META-INF/' or '/WEB-INF/' after uppercasing, so a path beginning with '../<webapp-name>/' bypasses the check and reaches protected directories.

Impact

An attacker could read configuration files and possibly source code from the WEB-INF and META-INF directories of a deployed application, which may contain sensitive information.

What the attacker needed

Web application deployed at root context (/); attacker can send HTTP requests to the server

The fix

The vendor fixed the software to detect illegal path traversals; the fixed versions are 6.2022.1, 5.2022.4, 4.1.2.191.38 (Community) and 5.45.0 (Enterprise).

How it was found

  1. Deploy a web application at the root context (/) using Payara Micro.
  2. Send an HTTP request with a path starting with ../<webapp-name>/ (not starting with /) to the server.
  3. The server responds with the contents of the requested file inside WEB-INF or META-INF.

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.

A web application server is supposed to keep certain folders like WEB-INF and META-INF private, because they hold configuration and sometimes source code. This report shows that by crafting a special web address, an attacker can trick the server into showing those private files. The mistake is that the server only checks the start of the address for forbidden folder names, so a slightly different address slips past the check.

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 Michael Baer

View all

1 more disclosed report, best first.

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.