Every CVESearch/Get API key

CVE-2021-21696

Agent-to-controller access control allowed writing to sensitive directory used by Jenkins Pipeline: Shared Groovy Libraries Plugin

9.8 CriticalFix available

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 FilePath APIs, allowing attackers in control of agent processes to replace the code of a trusted library with a modified variant. This results in unsandboxed code execution in the Jenkins controller process.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.40%Up 1.3 points since Nov 5, 2021
90%50%10%1%

What each source reports

NVD Score used9.8

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 FilePath APIs, allowing attackers in control of agent processes to replace the code of a trusted library with a modified variant. This results in unsandboxed code execution in the Jenkins controller process.

Record
CVE-2021-21696
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Updated
2026-11-02
CVE ListNo score

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 FilePath APIs, allowing attackers in control of agent processes to replace the code of a trusted library with a modified variant. This results in unsandboxed code execution in the Jenkins controller process.

Record
CVE-2021-21696
Updated
2026-11-02
EUVDEUVD-2022-3513No score

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 FilePath APIs, allowing attackers in control of agent processes to replace the code of a trusted library with a modified variant. This results in unsandboxed code execution in the Jenkins controller process.

Record
EUVD-2022-3513
Updated
2026-11-03
GitHub AdvisoriesGHSA-c5r9-rx53-q3gf8.8

Agent-to-controller access control allowed writing to sensitive directory used by Jenkins Pipeline: Shared Groovy Libraries Plugin

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 FilePath APIs. This directory is used by the Pipeline: Shared Groovy Libraries Plugin to store copies of shared libraries.

This allows attackers in control of agent processes to replace the code of a trusted library with a modified variant, resulting in unsandboxed code execution in the Jenkins controller process.

Jenkins 2.319, LTS 2.303.3 prohibits agent read/write access to the libs/ directory inside build directories.

If you are unable to immediately upgrade to Jenkins 2.319, LTS 2.303.3, you can install the Remoting Security Workaround Plugin. It will prevent all agent-to-controller file access using FilePath APIs. Because it is more restrictive than Jenkins 2.319, LTS 2.303.3, more plugins are incompatible with it. Make sure to read the plugin documentation before installing it.

It is not easily possible to customize the file access rules to prohibit access to the libs/ directory specifically, as built-in rules (granting access to <BUILDDIR> contents) would take precedence over a custom rule prohibiting access.

Record
GHSA-c5r9-rx53-q3gf
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-693
Updated
2026-11-02
OSV9.8

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 FilePath APIs, allowing attackers in control of agent processes to replace the code of a trusted library with a modified variant. This results in unsandboxed code execution in the Jenkins controller process.

Record
CVE-2021-21696
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-c5r9-rx53-q3gf8.8

Agent-to-controller access control allowed writing to sensitive directory used by Jenkins Pipeline: Shared Groovy Libraries Plugin

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 FilePath APIs. This directory is used by the Pipeline: Shared Groovy Libraries Plugin to store copies of shared libraries.

This allows attackers in control of agent processes to replace the code of a trusted library with a modified variant, resulting in unsandboxed code execution in the Jenkins controller process.

Jenkins 2.319, LTS 2.303.3 prohibits agent read/write access to the libs/ directory inside build directories.

If you are unable to immediately upgrade to Jenkins 2.319, LTS 2.303.3, you can install the Remoting Security Workaround Plugin. It will prevent all agent-to-controller file access using FilePath APIs. Because it is more restrictive than Jenkins 2.319, LTS 2.303.3, more plugins are incompatible with it. Make sure to read the plugin documentation before installing it.

It is not easily possible to customize the file access rules to prohibit access to the libs/ directory specifically, as built-in rules (granting access to <BUILDDIR> contents) would take precedence over a custom rule prohibiting access.

Record
GHSA-c5r9-rx53-q3gf
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-693
Updated
2026-11-02
Show 7 moreShow less
OSVRHSA-2021:47999.0

Red Hat Security Advisory: OpenShift Container Platform 4.6.51 packages and security update

Record
RHSA-2021:4799
CVSS 3.1
9.0 CriticalCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2021:48019.0

Red Hat Security Advisory: OpenShift Container Platform 4.7.38 security update

Record
RHSA-2021:4801
CVSS 3.1
9.0 CriticalCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2021:48279.0

Red Hat Security Advisory: OpenShift Container Platform 3.11.569 security update

Record
RHSA-2021:4827
CVSS 3.1
9.0 CriticalCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2021:48299.0

Red Hat Security Advisory: OpenShift Container Platform 4.8.22 security update

Record
RHSA-2021:4829
CVSS 3.1
9.0 CriticalCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2021:48339.0

Red Hat Security Advisory: OpenShift Container Platform 4.9.9 security update

Record
RHSA-2021:4833
CVSS 3.1
9.0 CriticalCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2022:00559.0

Red Hat Security Advisory: OpenShift Container Platform 4.10.3 bug fix and security update

Record
RHSA-2022:0055
CVSS 3.1
9.0 CriticalCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVBIT-jenkins-2021-21696No score

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 FilePath APIs, allowing attackers in control of agent processes to replace the code of a trusted library with a modified variant. This results in unsandboxed code execution in the Jenkins controller process.

Record
BIT-jenkins-2021-21696
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
org.jenkins-ci.main:jenkins-core
Maven
2.304 to 2.318
2.319
org.jenkins-ci.main:jenkins-core
Maven
through 2.303.2
2.303.3
jenkins
Bitnami
before 2.318.1
2.318.1
org.jenkins-ci.main:jenkins-core
Maven
before 2.303.3, plus listed versions
1.3961.3971.3981.3991.400
Show 45 moreShow less
1.4011.4031.4041.4051.4061.4071.4081.4091.409.11.409.21.409.31.4101.4111.4121.4131.4141.4151.4161.4171.4181.4191.4201.4211.4221.4231.4241.424.11.424.21.424.31.424.41.424.51.424.61.4251.4261.4271.4281.4291.4301.4311.4321.4331.4341.4351.4361.437
2.303.3
org.jenkins-ci.main:jenkins-core
Maven
2.304 up to 2.319, plus listed versions
2.3052.3062.3072.3082.309
Show 8 moreShow less
2.3112.3122.3132.3142.3152.3162.3172.318
2.319
jenkins
Red Hat:openshift:4.6::el8
From an advisory covering 14 CVEs
before 0:2.303.3.1637597493-1.el8
0:2.303.3.1637597493-1.el8
jenkins-2-plugins
Red Hat:openshift:4.6::el8
From an advisory covering 14 CVEs
before 0:4.6.1637602169-1.el8
0:4.6.1637602169-1.el8
jenkins
Red Hat:openshift:4.7::el8
From an advisory covering 14 CVEs
before 0:2.303.3.1637597018-1.el8
0:2.303.3.1637597018-1.el8
jenkins-2-plugins
Red Hat:openshift:4.7::el8
From an advisory covering 14 CVEs
before 0:4.7.1637600997-1.el8
0:4.7.1637600997-1.el8
jenkins
Red Hat:openshift:3.11::el7
From an advisory covering 14 CVEs
before 0:2.303.3.1637698110-1.el7
0:2.303.3.1637698110-1.el7
Show 26 moreShow less
Affected packages
PackageAffectedFixed
jenkins-2-plugins
Red Hat:openshift:3.11::el7
From an advisory covering 14 CVEs
before 0:3.11.1637699107-1.el7
0:3.11.1637699107-1.el7
coreos-installer
Red Hat:openshift:4.8::el8
From an advisory covering 15 CVEs
before 0:0.9.0-8.rhaos4.8.el8
0:0.9.0-8.rhaos4.8.el8
jenkins
Red Hat:openshift:4.8::el8
From an advisory covering 15 CVEs
before 0:2.303.3.1637596565-1.el8
0:2.303.3.1637596565-1.el8
jenkins-2-plugins
Red Hat:openshift:4.8::el8
From an advisory covering 15 CVEs
before 0:4.8.1637599935-1.el8
0:4.8.1637599935-1.el8
jenkins
Red Hat:openshift:4.9::el8
From an advisory covering 14 CVEs
before 0:2.303.3.1637595827-1.el8
0:2.303.3.1637595827-1.el8
jenkins-2-plugins
Red Hat:openshift:4.9::el8
From an advisory covering 14 CVEs
before 0:4.9.1637598812-1.el8
0:4.9.1637598812-1.el8
jenkins
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:2.319.2.1643288987-1.el8
0:2.319.2.1643288987-1.el8
coreos-installer
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:0.12.0-1.rhaos4.10.el8
0:0.12.0-1.rhaos4.10.el8
coreos-installer-bootinfra
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:0.12.0-1.rhaos4.10.el8
0:0.12.0-1.rhaos4.10.el8
coreos-installer-bootinfra-debuginfo
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:0.12.0-1.rhaos4.10.el8
0:0.12.0-1.rhaos4.10.el8
coreos-installer-debuginfo
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:0.12.0-1.rhaos4.10.el8
0:0.12.0-1.rhaos4.10.el8
coreos-installer-debugsource
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:0.12.0-1.rhaos4.10.el8
0:0.12.0-1.rhaos4.10.el8
jenkins-2-plugins
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:4.10.1643404185-1.el8
0:4.10.1643404185-1.el8
cri-o
Red Hat:openshift:4.10::el7
From an advisory covering 24 CVEs
before 0:1.23.0-92.rhaos4.10.gitdaab4d1.el7
0:1.23.0-92.rhaos4.10.gitdaab4d1.el7
cri-o-debuginfo
Red Hat:openshift:4.10::el7
From an advisory covering 24 CVEs
before 0:1.23.0-92.rhaos4.10.gitdaab4d1.el7
0:1.23.0-92.rhaos4.10.gitdaab4d1.el7
cri-o
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:1.23.1-9.rhaos4.10.gitbdffb9a.el8
0:1.23.1-9.rhaos4.10.gitbdffb9a.el8
cri-o-debuginfo
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:1.23.1-9.rhaos4.10.gitbdffb9a.el8
0:1.23.1-9.rhaos4.10.gitbdffb9a.el8
cri-o-debugsource
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:1.23.1-9.rhaos4.10.gitbdffb9a.el8
0:1.23.1-9.rhaos4.10.gitbdffb9a.el8
openshift
Red Hat:openshift:4.10::el7
From an advisory covering 24 CVEs
before 0:4.10.0-202202250816.p0.ge419edf.assembly.stream.el7
0:4.10.0-202202250816.p0.ge419edf.assembly.stream.el7
openshift-clients
Red Hat:openshift:4.10::el7
From an advisory covering 24 CVEs
before 0:4.10.0-202202160023.p0.gf93da17.assembly.stream.el7
0:4.10.0-202202160023.p0.gf93da17.assembly.stream.el7
openshift-clients-redistributable
Red Hat:openshift:4.10::el7
From an advisory covering 24 CVEs
before 0:4.10.0-202202160023.p0.gf93da17.assembly.stream.el7
0:4.10.0-202202160023.p0.gf93da17.assembly.stream.el7
openshift-hyperkube
Red Hat:openshift:4.10::el7
From an advisory covering 24 CVEs
before 0:4.10.0-202202250816.p0.ge419edf.assembly.stream.el7
0:4.10.0-202202250816.p0.ge419edf.assembly.stream.el7
openshift
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:4.10.0-202202250816.p0.ge419edf.assembly.stream.el8
0:4.10.0-202202250816.p0.ge419edf.assembly.stream.el8
openshift-clients
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:4.10.0-202202160023.p0.gf93da17.assembly.stream.el8
0:4.10.0-202202160023.p0.gf93da17.assembly.stream.el8
openshift-clients-redistributable
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:4.10.0-202202160023.p0.gf93da17.assembly.stream.el8
0:4.10.0-202202160023.p0.gf93da17.assembly.stream.el8
openshift-hyperkube
Red Hat:openshift:4.10::el8
From an advisory covering 24 CVEs
before 0:4.10.0-202202250816.p0.ge419edf.assembly.stream.el8
0:4.10.0-202202250816.p0.ge419edf.assembly.stream.el8

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-21696 is a critical vulnerability (CVSS 9.8) in Jenkins, published November 4, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.40%, the 84th percentile. Fixed in org.jenkins-ci.main:jenkins-core 2.319.

References

Show 130 moreShow less
This page doesn't list everything

Left out here: 658 versions. The JSON record has them.

MoveEnter Open