🛡️ CVE-2021-21685 — jenkins

🔴 CVSS 9.5 — Critical ✅ No Known Exploit OSV
9.5
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Multiple vulnerabilities allow bypassing path filtering of agent-to-controller access control in Jenkins

The agent-to-controller security subsystem limits which files on the Jenkins controller can be accessed by agent processes.

Multiple 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.

SECURITY-2427 / CVE-2021-21685: FilePath#mkdirs does not check permission to create parent directories.

We 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/).

Jenkins 2.319, LTS 2.303.3 addresses these security vulnerabilities.

SECURITY-2427 / CVE-2021-21685: FilePath#mkdirs checks permission to create parent directories.

As 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.

If 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.

Affected software

CVE-2021-21685 is recorded against 2 packages.

  • jenkins
  • org.jenkins-ci.main:jenkins-core (from 2.304 up to 2.319)

Timeline and source

Published on 6 March 2024 and last revised on 3 April 2025. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

www.openwall.com (Web)
www.jenkins.io (Web)
nvd.nist.gov (Web)

Details

Severity CRITICAL
CVSS Score 9.5
CVSS Vector N/A
CWE N/A
Public Exploit ✅ No
Source OSV
Published 2024-03-06
Updated 2026-08-12
Modified 2025-04-03
Fix URL N/A

Affected Packages

Software From version Fixed in
jenkins
org.jenkins-ci.main:jenkins-core 2.304 2.319

Similar Threats

Exploit Protection

Are you running jenkins?

CVE-2021-21685 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2021-21685 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.