CVE-2018-6356 Improper Limitation of a Pathname to a Restricted Directory in Jenkins

Medium 6.5 Published Updated

Attackers with read permissions can exploit path traversal to download unauthorized files from the Jenkins master server.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2018-6356?

CVE-2018-6356 is a medium-severity path traversal vulnerability in Jenkins Jenkins, published on 20 Feb 2018. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Jenkins before 2.107 and Jenkins LTS before 2.89.4 did not properly prevent specifying relative paths that escape a base directory for URLs accessing plugin resource files. This allowed users with Overall/Read permission to download files from the Jenkins master they should not have access to. On Windows, any file accessible to the Jenkins master process could be downloaded. On other operating systems, any file within the Jenkins home directory accessible to the Jenkins master process could be downloaded.

Weakness: CWE-22

Which versions are affected by CVE-2018-6356?

4 open source packages ship an affected version, including org.jenkins-ci.main:jenkins-core. It affects 2 products.

PackageAffectedFixed in
org.jenkins-ci.main:jenkins-core MavenAll versions2.89.4
org.jenkins-ci.main:jenkins-core MavenAll versions2.89.4
org.jenkins-ci.main:jenkins-core MavenFrom 2.902.107
org.jenkins-ci.main:jenkins-core MavenFrom 2.902.107

Products include Jenkins Jenkins, Oracle Communications Cloud Native Core Automated Test Suite.

How do I fix CVE-2018-6356?

Upgrade org.jenkins-ci.main:jenkins-core to a fixed version for your release line: 2.89.4 or 2.107.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2018-6356 being exploited?

There is no known exploitation of CVE-2018-6356 in the wild and no public exploit code.

All Jenkins Jenkins vulnerabilities

Sources

Also known as GHSA-5p59-v5wm-77v4.

Is CVE-2018-6356 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free