Skip to content
Path traversal Advisory Beginner CVE-2023-35147

GHSL-2023-054: Unauthenticated arbitrary file read in Jenkins plugin 3.0.12 - CVE-2023-35147

The AWS CodeCommit Trigger Jenkins Plugin does not restrict a file name path parameter in an HTTP endpoint, allowing authenticated attackers to read arbitrary files on the Jenkins controller file system. An attacker can use path traversal sequences to access sensitive files such as credentials.xml or /etc/passwd.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

AWS CodeCommit Trigger Jenkins Plugin 3.0.12 and earlier does not restrict a file name path parameter in an HTTP endpoint, allowing authenticated attackers to read arbitrary files on the Jenkins controller 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 takes the file name directly from the request path and appends it to a directory path without validating or sanitising it, allowing path traversal.

Impact

This issue may lead to arbitrary file read, potentially exposing sensitive files such as Jenkins credentials or system files.

What the attacker needed

Jenkins with the plugin installed; Authenticated access to Jenkins; A job configured with the plugin's trigger

How it was found

  1. Configure a Jenkins job named 'test' that uses the 'Build when a CodeCommit repository is updated and notifies a SQS queue' build trigger.
  2. Send an authenticated GET request to the plugin's download endpoint with path traversal sequences in the file name.
  3. The server returns the contents of the requested file, such as credentials.xml or /etc/passwd.

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.

This plugin has a web address that takes a file name from the URL and uses it to open a file on the server. Because it does not check for '..' sequences, which mean 'go up a folder', an attacker can request files outside the intended folder. They need to be logged in to Jenkins and have a job set up with this plugin's trigger.

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.