MODERATE 5.3

CVE-2021-21615

Time-of-check Time-of-use (TOCTOU) Race Condition in Jenkins

Description

Due to a time-of-check to time-of-use (TOCTOU) race condition, the file browser for workspaces, archived artifacts, and $JENKINS_HOME/userContent/ follows symbolic links to locations outside the directory being browsed in Jenkins 2.275 and LTS 2.263.2.

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 incorrectly applied fix for SECURITY-1452 / CVE-2021-21602 in the 2021-01-13 security advisory.

Jenkins 2.276, LTS 2.263.3 no longer differentiates the check and the use of symlinks in workspace browsers.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.jenkins-ci.main » jenkins-core
< 2.263.3>= 2.264, < 2.276
2.263.3, 2.276

Blast radius

1affected artifacts
2,717affected versions
105dependent artifacts (est.)
4,595dependent versions

44% of the dependent artifacts (47) still pull an affected version in their latest release.

DepthDependent versions
Direct
3,656
2 hops
731
3 hops
35
4 hops
81
5 hops
26
6 hops
66

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

References

Advisorynvd.nist.gov
Webjenkins.io
Webopenwall.com