CVE-2021-21695
Java vulnerability analysis and mitigation

Overview

CVE-2021-21695 is a security vulnerability discovered in Jenkins 2.318 and earlier, LTS 2.303.2 and earlier, where FilePath#listFiles lists files outside directories that agents are allowed to access when following symbolic links. This vulnerability was part of a larger set of critical vulnerabilities in the agent-to-controller security subsystem that affected Jenkins' file path filtering implementation (Jenkins Advisory).

Technical details

The vulnerability exists in the FilePath#listFiles implementation where the system fails to properly check stat permissions on files it returns, allowing the listing of files outside allowed directories when following symbolic links. This was one of multiple vulnerabilities in Jenkins' agent-to-controller security subsystem that could allow agent processes to read and write arbitrary files on the Jenkins controller file system (Jenkins Advisory).

Impact

This vulnerability could allow attackers with control over agent processes to list files outside of their permitted directories on the Jenkins controller file system, potentially exposing sensitive information. The issue was rated as part of a Critical severity group of vulnerabilities affecting the agent-to-controller security subsystem (Jenkins Advisory).

Mitigation and workarounds

The vulnerability was fixed in Jenkins 2.319 and LTS 2.303.3, where FilePath#listFiles now checks stat permission on files it returns, preventing listing of files outside allowed directories. For users unable to immediately upgrade, installing the Remoting Security Workaround Plugin is recommended as a temporary solution, though this plugin is more restrictive and may cause incompatibility with some other plugins (Jenkins Advisory).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-14306CRITICAL10
  • JavaJava
  • net.sf.robocode:robocode.core
NoYesDec 09, 2025
CVE-2025-14307CRITICAL9.3
  • JavaJava
  • net.sf.robocode:robocode.battle
NoYesDec 09, 2025
CVE-2025-66566HIGH8.2
  • JavaJava
  • at.yawk.lz4:lz4-java
NoYesDec 05, 2025
CVE-2025-66623HIGH7.4
  • JavaJava
  • io.strimzi:strimzi
NoYesDec 05, 2025
GHSA-93fv-4pm9-xp28MEDIUM6.9
  • JavaJava
  • net.dv8tion:jda
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management