CVE-2022-34181 Agent-to-controller security bypass in Jenkins xUnit Plugin

Critical 9.1 Published Updated

Attackers controlling agent processes can create arbitrary directories or read test results from existing files on the Jenkins controller.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-34181?

CVE-2022-34181 is a critical path traversal vulnerability in Jenkins xUnit Plugin, published on 22 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Jenkins xUnit Plugin 3.0.8 and earlier implements an agent-to-controller message that creates a user-specified directory if it doesn't exist, and parsing files inside it as test results, allowing attackers able to control agent processes to create an arbitrary directory on the Jenkins controller or to obtain test results from existing files in an attacker-specified directory.

Which versions are affected by CVE-2022-34181?

2 open source packages ship an affected version, including org.jenkins-ci.plugins:xunit. It affects 1 product.

PackageAffectedFixed in
org.jenkins-ci.plugins:xunit MavenAll versions3.1.0
org.jenkins-ci.plugins:xunit MavenAll versions3.1.0

Products include Jenkins Xunit.

How do I fix CVE-2022-34181?

Upgrade org.jenkins-ci.plugins:xunit to 3.1.0 or later.

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

Is CVE-2022-34181 being exploited?

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

Sources

Also known as GHSA-298j-9q4w-6rm4.

Is CVE-2022-34181 in your software?

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

Check your SBOMs for free