CVE-2021-21602: Medium severity Jenkins Jenkins vulnerability
Jenkins 2.274 and earlier, LTS 2.263.1 and earlier allows reading arbitrary files using the file browser for workspaces and archived artifacts by following symlinks.
Other sources
The file browser for workspaces, archived artifacts, and $JENKINSHOME/userContent/ follows symbolic links to locations outside the directory being browsed in Jenkins 2.274 and earlier, LTS 2.263.1 and earlier.
This allows attackers with Job/Workspace permission and the ability to control workspace contents (e.g., with Job/Configure permission or the ability to change SCM contents) to create symbolic links that allow them to access files outside workspaces using the workspace browser.
This issue is caused by an incomplete fix for SECURITY-904 / CVE-2018-1000862 in the 2018-12-08 security advisory.
Jenkins 2.275, LTS 2.263.2 no longer supports symlinks in workspace browsers. While they may still exist on the file system, they are no longer shown on the UI, accessible via URLs, or included in directory content downloads.
This fix only changes the behavior of the Jenkins UI. Archiving artifacts still behaves as before.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/jenkinsto a version that resolves this vulnerability.Fixed in 0:2.263.3.1612433584-1.el7 - Upgrade
Upgrade
redhat/conmonto a version that resolves this vulnerability.Fixed in 2:2.0.21-1.rhaos4.5.el7 - Upgrade
Upgrade
redhat/jenkinsto a version that resolves this vulnerability.Fixed in 0:2.263.3.1612434332-1.el7 - Upgrade
Upgrade
redhat/machine-config-daemonto a version that resolves this vulnerability.Fixed in 0:4.5.0-202102050524.p0.git.2594.ff3b8c0.el8 - Upgrade
Upgrade
redhat/openshiftto a version that resolves this vulnerability.Fixed in 0:4.5.0-202102050524.p0.git.0.9229406.el7 - Upgrade
Upgrade
redhat/openshift-ansibleto a version that resolves this vulnerability.Fixed in 0:4.5.0-202102031005.p0.git.0.c6839a2.el7 - Upgrade
Upgrade
redhat/openshift-clientsto a version that resolves this vulnerability.Fixed in 0:4.5.0-202102051529.p0.git.3612.61b096a.el8 - Upgrade
Upgrade
redhat/runcto a version that resolves this vulnerability.Fixed in 0:1.0.0-72.rhaos4.5.giteadfc6b.el8 - Upgrade
Upgrade
redhat/jenkinsto a version that resolves this vulnerability.Fixed in 0:2.263.3.1612434510-1.el8 - Upgrade
Upgrade
maven/org.jenkins-ci.main:jenkins-coreto a version that resolves this vulnerability.Fixed in 2.275 - Upgrade
Upgrade
maven/org.jenkins-ci.main:jenkins-coreto a version that resolves this vulnerability.Fixed in 2.263.2 - Upgrade
Upgrade
redhat/jenkinsto a version that resolves this vulnerability.Fixed in 2.275 - Upgrade
Upgrade
redhat/jenkins LTSto a version that resolves this vulnerability.Fixed in 2.263.2 - Upgrade
Upgrade
Jenkinsto a version that resolves this vulnerability.Fixed in 2.275 - Upgrade
Upgrade
Jenkins LTSto a version that resolves this vulnerability.Fixed in 2.263.2 - Configuration
After upgrading, Jenkins no longer supports symlinks in the file browser for workspaces, archived artifacts, and $JENKINS_HOME/userContent/, so symlinks are not followed to locations outside the directory being browsed.
Jenkins UI file browser (workspaces and archived artifacts) symlink handling = disable symlinks in workspace browsers
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2021-21602?
CVE-2021-21602 is rated as a medium severity vulnerability in Jenkins.
How do I fix CVE-2021-21602?
To fix CVE-2021-21602, upgrade Jenkins to version 2.275 or later, or LTS version 2.263.2 or later.
What versions of Jenkins are affected by CVE-2021-21602?
Jenkins versions 2.274 and earlier, including LTS versions 2.263.1 and earlier, are affected by CVE-2021-21602.
What types of files can be accessed due to CVE-2021-21602?
CVE-2021-21602 allows attackers to read arbitrary files through the file browser for workspaces and archived artifacts.
Does CVE-2021-21602 affect plugins in Jenkins?
CVE-2021-21602 specifically affects the core Jenkins application rather than individual plugins.