{"id":"CVE-2021-21687","aliases":["CVE-2021-21687","GHSA-3q84-vrvx-rfvf","BIT-JENKINS-2021-21687"],"related":[],"kind":"vulnerability","state":"published","title":"Multiple vulnerabilities allow bypassing path filtering of agent-to-controller access control in Jenkins","summary":"Jenkins 2.318 and earlier, LTS 2.303.2 and earlier does not check agent-to-controller access to create symbolic links when unarchiving a symbolic link in FilePath#untar.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Jenkins 2.318 and earlier, LTS 2.303.2 and earlier does not check agent-to-controller access to create symbolic links when unarchiving a symbolic link in FilePath#untar.","source":"cvelist"},{"lang":"en","text":"The agent-to-controller security subsystem limits which files on the Jenkins controller can be accessed by agent processes.\n\nMultiple vulnerabilities in the file path filtering implementation of Jenkins 2.318 and earlier, LTS 2.303.2 and earlier allow agent processes to read and write arbitrary files on the Jenkins controller file system, and obtain some information about Jenkins controller file systems.\n\nSECURITY-2446 / CVE-2021-21687: `FilePath#untar` does not check permission to create symbolic links when unarchiving a symbolic link.\n\nWe expect that most of these vulnerabilities have been present since [SECURITY-144 was addressed in the 2014-10-30 security advisory](https://www.jenkins.io/security/advisory/2014-10-30/).\n\nJenkins 2.319, LTS 2.303.3 addresses these security vulnerabilities.\n\nSECURITY-2446 / CVE-2021-21687: `FilePath#untar` checks permission to create symbolic links when unarchiving a symbolic link.\n\nAs some common operations are now newly subject to access control, it is expected that plugins sending commands from agents to the controller may start failing. Additionally, the newly introduced path canonicalization means that instances using a custom builds directory ([Java system property jenkins.model.Jenkins.buildsDir](https://www.jenkins.io/doc/book/managing/system-properties/#jenkins-model-jenkins-buildsdir)) or partitioning `JENKINS_HOME` using symbolic links may fail access control checks. See [the documentation](https://www.jenkins.io/doc/book/security/controller-isolation/agent-to-controller/#file-access-rules) for how to customize the configuration in case of problems.\n\nIf you are unable to immediately upgrade to Jenkins 2.319, LTS 2.303.3, you can install the [Remoting Security Workaround Plugin](https://www.jenkins.io/redirect/remoting-security-workaround/). 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Jenkins versiones 2.318 y anteriores, LTS versiones 2.303.2 y anteriores, no comprueban el acceso agente-controlador para crear enlaces simbólicos cuando se desarchiva un enlace simbólico en FilePath#untar","source":"nvd"},{"lang":"en","text":"Jenkins LTS 2.303.2 and earlier does not check agent-to-controller access to create symbolic links when unarchiving a symbolic link in FilePath#untar.","format":"markdown","source":"bitnami"}],"published":"2021-11-04T16:30:27.000Z","modified":"2026-09-08T08:47:58.209Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:N","score":6.4,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-862"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","lastAffected":"2.318","status":"affected"},{"type":"custom","introduced":"unspecified","lastAffected":"LTS 2.303.2","status":"affected"}],"vendor":"Jenkins project","product":"Jenkins","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.303.3"}],"ecosystem":"Maven","package":"org.jenkins-ci.main:jenkins-core","purl":"pkg:maven/org.jenkins-ci.main/jenkins-core","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.304","status":"affected","fixed":"2.319"}],"ecosystem":"Maven","package":"org.jenkins-ci.main:jenkins-core","purl":"pkg:maven/org.jenkins-ci.main/jenkins-core","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.303.3"},{"status":"affected","fixed":"2.319"}],"vendor":"jenkins","product":"jenkins","cpe":"cpe:2.3:a:jenkins:jenkins:*:*:*:*:lts:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.319.0"}],"ecosystem":"Bitnami","package":"jenkins","purl":"pkg:bitnami/jenkins","source":"bitnami"}],"references":[{"url":"https://www.jenkins.io/security/advisory/2021-11-04/#SECURITY-2455","tags":["advisory","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21687","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/jenkinsci/jenkins","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"jenkins","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-21687","url":"https://www.cve.org/CVERecord?id=CVE-2021-21687","licence":"CVE Terms of Use","modified":"2024-08-03T18:23:28.304Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3q84-vrvx-rfvf","url":"https://github.com/advisories/GHSA-3q84-vrvx-rfvf","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:48.221Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-21687","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21687","licence":"Public domain","modified":"2026-06-17T03:35:59.900Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-JENKINS-2021-21687","url":"https://osv.dev/vulnerability/BIT-JENKINS-2021-21687","licence":"Apache-2.0","modified":"2026-09-08T08:47:58.209Z"}],"updatedAt":"2026-11-25T22:58:05.352Z","epss":{"score":0.01425,"percentile":0.73703,"date":"2026-12-01T12:00:22.000Z"}}