Skip to content
Path traversal Write-up Intermediate

Joomla! <= 4.1.0 (Tar.php) Zip Slip Vulnerability

The Tar extraction method builds file paths from archive filenames and the destination directory, which may allow path traversal.

Egidio Romano Follow

Published on karmainsecurity.com

The vulnerability is located in the /libraries/vendor/joomla/archive/src/Tar.php script.

Egidio Romano / EgiX, on karmainsecurity.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 code constructs the destination path by concatenating the user-controlled filename from the tar archive with the destination directory, without checking for directory traversal sequences.

Impact

The method may allow path traversal when extracting tar archives, potentially writing files outside the destination directory.

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.

When you extract a tar archive, the program uses the file names inside the archive to decide where to save each file. If it doesn't check that those names stay inside the intended folder, an attacker can craft an archive with a name like '../../evil.php' to write files anywhere on the server. This is called a Zip Slip or path traversal attack.

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 Egidio Romano

View all

5 more disclosed reports, best first.

More from Joomla!

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.