CVE-2021-21696

Jenkins 2.318 and earlier, LTS 2.303.2 and earlier does not limit agent read/write access to the libs/ directory inside build directories when using the…

published November 4, 2021

CVSS
—
EPSS
2%
Percentile
83.9
In the wild
Unconfirmed
What it is

⚠️ A crafty loophole in Jenkins lets agents play with fire! They can replace trusted libraries in build directories, leading to unsandboxed code execution in the controller process. 🔥 Think of it like a chef allowing kitchen staff access to swap out ingredients without checking the recipe—one sneaky substitution can ruin the whole dish! An attacker controlling an agent could replace crucial library files with malicious versions, unleashing unsandboxed code execution on the Jenkins controller. This could lead to unauthorized access, data leaks, or even complete system compromise—especially devastating for CI/CD pipelines.

Put simply

Think of it like a chef allowing kitchen staff access to swap out ingredients without checking the recipe—one sneaky substitution can ruin the whole dish! This vulnerability in Jenkins (versions 2.318 and earlier, LTS 2.303.2 and earlier) arises from the lack of restrictions on FilePath API access to the libs/ directory, allowing malicious modifications by agent processes.

What to do

An attacker controlling an agent could replace crucial library files with malicious versions, unleashing unsandboxed code execution on the Jenkins controller. This could lead to unauthorized access, data leaks, or even complete system compromise—especially devastating for CI/CD pipelines. To mitigate this, upgrade Jenkins to the latest version where this issue is resolved. Additionally, review your agent security configurations to limit access to sensitive directories. Regular audits and monitoring can help spot any unexpected changes swiftly! You've got this! By taking these steps, you'll be reinforcing your Jenkins security and keeping your CI/CD pipeline safe! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.02397 · 83.9th percentile
Published
2021-11-04T16:30Z
EPSS history
Timeline
  • 04 NOV 16:30Z
    Jenkins 2.318 and earlier, LTS 2.303.2 and earlier does not limit agent read/write access to the libs/ directory inside build directories when using the…
    cvelistv5