CVE Vulnerabilities

CVE-2021-21686

Improper Link Resolution Before File Access ('Link Following')

Published: Nov 04, 2021 | Modified: Nov 22, 2023
CVSS 3.x
8.1
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
CVSS 2.x
5.8 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:N
RedHat/V2
RedHat/V3
9 IMPORTANT
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Ubuntu

File path filters in the agent-to-controller security subsystem of Jenkins 2.318 and earlier, LTS 2.303.2 and earlier do not canonicalize paths, allowing operations to follow symbolic links to outside allowed directories.

Weakness

The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.

Affected Software

Name Vendor Start Version End Version
Jenkins Jenkins * 2.303.3 (excluding)
Jenkins Jenkins * 2.319 (excluding)
Red Hat OpenShift Container Platform 3.11 RedHat jenkins-0:2.303.3.1637698110-1.el7 *
Red Hat OpenShift Container Platform 4.6 RedHat jenkins-0:2.303.3.1637597493-1.el8 *
Red Hat OpenShift Container Platform 4.7 RedHat jenkins-0:2.303.3.1637597018-1.el8 *
Red Hat OpenShift Container Platform 4.8 RedHat jenkins-0:2.303.3.1637596565-1.el8 *
Red Hat OpenShift Container Platform 4.9 RedHat jenkins-0:2.303.3.1637595827-1.el8 *

Potential Mitigations

  • Follow the principle of least privilege when assigning access rights to entities in a software system.
  • Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

References