The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-21696

CVE-2021-21696: Jenkins RCE Vulnerability

CVE-2021-21696 is a remote code execution vulnerability in Jenkins that allows attackers controlling agent processes to execute unsandboxed code on the controller. This article covers technical details, affected versions, and mitigation.

Updated: May 16, 2026

CVE-2021-21696 Overview

CVE-2021-21696 is a critical vulnerability in Jenkins automation server that allows attackers controlling agent processes to execute unsandboxed code in the Jenkins controller. The flaw exists because Jenkins does not restrict agent read/write access to the libs/ directory inside build directories when using the FilePath APIs. Attackers can replace the code of a trusted library with a modified variant, leading to arbitrary code execution within the trusted controller process. Jenkins 2.318 and earlier, along with LTS 2.303.2 and earlier, are affected.

Critical Impact

Compromised or malicious Jenkins agents can replace trusted library code and achieve unsandboxed code execution on the Jenkins controller, leading to full CI/CD pipeline compromise.

Affected Products

  • Jenkins weekly releases 2.318 and earlier
  • Jenkins LTS 2.303.2 and earlier
  • Jenkins controllers using FilePath APIs with untrusted agents

Discovery Timeline

  • 2021-11-04 - Jenkins publishes Security Advisory SECURITY-2423 with patched releases
  • 2021-11-04 - CVE-2021-21696 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-21696

Vulnerability Analysis

The vulnerability resides in how Jenkins handles file operations between agents and the controller. Jenkins uses the FilePath API to perform file system operations across the controller-agent boundary. The controller copies trusted libraries into the libs/ directory of each build directory for execution. The FilePath API does not restrict agent processes from reading or writing to this libs/ directory. An attacker who controls an agent process can overwrite library files before the controller loads them. Because these libraries execute in the controller's trusted context, they run outside the Groovy sandbox.

Root Cause

The root cause is missing access control on agent-initiated file operations targeting the libs/ subdirectory of build directories. Jenkins assumed agents had no legitimate need to access this path but did not enforce that restriction in the FilePath APIs. This results in a trust boundary violation between agent processes and the controller.

Attack Vector

An attacker first needs to control a Jenkins agent process, which can occur through compromised build nodes, malicious build scripts running on agents, or attacker-controlled agent hosts. The attacker then uses the FilePath API surface exposed to the agent to write modified Java class files or JARs into the build's libs/ directory. When the controller loads or invokes these libraries during build orchestration, the attacker-supplied code executes in the controller process with full Jenkins privileges, bypassing the Groovy sandbox entirely. See the Jenkins Security Advisory SECURITY-2423 for further technical details.

Detection Methods for CVE-2021-21696

Indicators of Compromise

  • Unexpected file writes from agent processes targeting the libs/ subdirectory inside Jenkins build directories
  • Modification timestamps on files in $JENKINS_HOME/jobs/*/builds/*/libs/ that do not match controller-initiated build setup
  • Unusual child processes spawned by the Jenkins controller process following agent communication
  • Outbound network connections from the Jenkins controller to attacker infrastructure during or after builds

Detection Strategies

  • Monitor file integrity on the Jenkins controller's build directory tree, especially libs/ paths, for writes originating from remoting channels
  • Audit Jenkins controller logs for unexpected class loading events or Groovy execution outside the sandbox
  • Correlate agent connection events with subsequent file modifications and process activity on the controller host

Monitoring Recommendations

  • Enable Jenkins audit logging and forward events to a centralized SIEM for correlation with host telemetry
  • Track Jenkins controller process behavior including child process creation, file system writes, and outbound network traffic
  • Alert on any deviation from baseline behavior for the Jenkins controller user account

How to Mitigate CVE-2021-21696

Immediate Actions Required

  • Upgrade Jenkins weekly to version 2.319 or later
  • Upgrade Jenkins LTS to version 2.303.3 or later
  • Audit existing agents and build nodes for signs of compromise before applying the patch
  • Restrict which users and projects can configure agents and run builds on shared infrastructure

Patch Information

Jenkins addressed the issue in weekly release 2.319 and LTS release 2.303.3 by limiting agent read/write access to the libs/ directory inside build directories when using the FilePath APIs. The fix and full details are documented in the Jenkins Security Advisory SECURITY-2423 and the corresponding Openwall OSS Security discussion.

Workarounds

  • Isolate Jenkins agents into dedicated network segments and treat them as untrusted
  • Avoid running builds from untrusted sources on agents that share infrastructure with sensitive projects
  • Use ephemeral, single-use build agents to limit the window for agent-side attacker persistence
  • Apply principle of least privilege to the Jenkins controller service account to reduce blast radius

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechJenkins

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.95%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • NVD-CWE-Other
  • Technical References
  • Openwall OSS Security Discussion
  • Vendor Resources
  • Jenkins Security Advisory #SECURITY-2423
  • Related CVEs
  • CVE-2026-42520: Jenkins Credentials Binding RCE Flaw

  • CVE-2025-53652: Jenkins Git Parameter RCE Vulnerability

  • CVE-2024-34144: Jenkins Script Security RCE Vulnerability

  • CVE-2025-31722: Jenkins Templating Engine RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English