Skip to content
Path traversal Advisory Intermediate CVE-2023-32981

GHSL-2023-058_GHSL-2023-059: ZipSlip in Jenkins Pipeline Utility Steps Plugin - CVE-2023-32981

The Jenkins Pipeline Utility Steps Plugin extracted ZIP and TAR archives without validating entry names, allowing path traversal sequences to write files outside the intended directory. An attacker who could supply a malicious archive could create or replace arbitrary files on the Jenkins agent filesystem.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

Jenkins Pipeline Utility Steps Plugin 2.15.1 and earlier allows attackers able to manipulate a TAR or ZIP file extracted by the plugin to create or replace any file on the file system.

ghsecuritylab, 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

Root cause

The plugin constructed destination file paths directly from archive entry names without checking for path traversal sequences.

Impact

This issue may lead to arbitrary file write, potentially allowing an attacker to create or replace any file on the filesystem.

What the attacker needed

Ability to supply a malicious ZIP or TAR archive; Jenkins pipeline job that extracts the archive

The fix

The issue was fixed in version 2.15.2 and later by validating archive entry names to prevent path traversal.

How it was found

  1. Create a malicious ZIP or TAR archive containing an entry with a path traversal name.
  2. Place the malicious archive on the Jenkins agent filesystem.
  3. Configure a pipeline job to extract the archive using the unzip or untar step.
  4. Run the job; the file is written outside the intended 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 report has not been written yet. The Original tab links to the source.

When you unzip a file, the names inside the archive are used to decide where each file goes. If a name contains '../', it can point to a folder outside the intended destination, letting someone write files anywhere. This is called a ZipSlip (or TarSlip) vulnerability.

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 ghsecuritylab

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.