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
    • 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-2025-31722

CVE-2025-31722: Jenkins Templating Engine RCE Vulnerability

CVE-2025-31722 is a remote code execution vulnerability in Jenkins Templating Engine Plugin that allows attackers to execute arbitrary code in the Jenkins controller JVM. This article covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-31722 Overview

CVE-2025-31722 is a code injection vulnerability affecting the Jenkins Templating Engine Plugin version 2.5.3 and earlier. The vulnerability exists because libraries defined in folders are not subject to sandbox protection, enabling attackers with Item/Configure permission to execute arbitrary code in the context of the Jenkins controller JVM. This represents a significant security risk for organizations using Jenkins for CI/CD pipelines, as successful exploitation could lead to complete compromise of the Jenkins environment.

Critical Impact

Attackers with Item/Configure permission can bypass Groovy sandbox restrictions and execute arbitrary code on the Jenkins controller, potentially compromising the entire CI/CD infrastructure.

Affected Products

  • Jenkins Templating Engine Plugin version 2.5.3 and earlier
  • Jenkins installations with the Templating Engine Plugin installed
  • CI/CD environments utilizing Jenkins Pipeline libraries

Discovery Timeline

  • April 2, 2025 - CVE-2025-31722 published to NVD
  • April 29, 2025 - Last updated in NVD database

Technical Details for CVE-2025-31722

Vulnerability Analysis

This vulnerability falls under CWE-94 (Improper Control of Generation of Code - Code Injection). The Jenkins Templating Engine Plugin is designed to provide a framework for creating reusable, standardized pipeline templates. However, a critical security oversight allows libraries defined within folders to execute outside the Groovy sandbox protection mechanism.

The sandbox mechanism in Jenkins is a fundamental security control designed to prevent untrusted code from accessing sensitive Jenkins internals or the underlying operating system. When this protection is bypassed, attackers gain the ability to execute arbitrary Java and Groovy code with the full privileges of the Jenkins controller process.

The network-based attack vector with low complexity means that any authenticated user with Item/Configure permissions can exploit this vulnerability without requiring any user interaction. Given that Item/Configure is a relatively common permission granted to development teams for managing their own build jobs, the potential attack surface is substantial.

Root Cause

The root cause of this vulnerability stems from insufficient access control enforcement in the Templating Engine Plugin. When libraries are defined within Jenkins folders, the plugin fails to apply the expected sandbox restrictions that would normally contain and limit the execution capabilities of pipeline code. This oversight creates a pathway for privilege escalation from limited pipeline authoring permissions to full code execution on the Jenkins controller.

Attack Vector

The attack is network-accessible and requires low privileges (Item/Configure permission). An attacker who has legitimate access to configure Jenkins items can craft malicious library definitions within folders. These library definitions, when processed by the Templating Engine Plugin, execute outside the sandbox protections, allowing the attacker to:

  1. Access the Jenkins controller file system
  2. Execute arbitrary system commands
  3. Access credentials stored in Jenkins
  4. Modify or exfiltrate build artifacts and secrets
  5. Pivot to other systems accessible from the Jenkins controller

The vulnerability is particularly dangerous because it can be exploited by insider threats or through compromised developer accounts that have standard CI/CD access but not full administrative privileges.

Detection Methods for CVE-2025-31722

Indicators of Compromise

  • Unusual library definitions within Jenkins folders that contain unexpected code patterns
  • Jenkins controller logs showing execution of suspicious system commands or file operations
  • Unexpected network connections originating from the Jenkins controller process
  • Modifications to Jenkins configuration files or credential stores outside normal change windows
  • Abnormal CPU or memory usage on the Jenkins controller indicating code execution

Detection Strategies

  • Monitor Jenkins audit logs for configuration changes to items and folder-level library definitions
  • Implement file integrity monitoring on the Jenkins controller to detect unauthorized changes
  • Deploy endpoint detection solutions on the Jenkins controller to identify suspicious process execution
  • Review Script Security plugin logs for sandbox bypass attempts or unusual approval requests

Monitoring Recommendations

  • Enable comprehensive audit logging within Jenkins to track all configuration changes
  • Configure alerts for any modifications to Templating Engine library definitions
  • Implement network monitoring to detect unusual outbound connections from the Jenkins controller
  • Regularly review user permissions, particularly Item/Configure access grants

How to Mitigate CVE-2025-31722

Immediate Actions Required

  • Upgrade Jenkins Templating Engine Plugin to a patched version immediately
  • Audit current folder-level library definitions for any suspicious or unauthorized code
  • Review and restrict Item/Configure permissions to only essential personnel
  • Enable Jenkins Script Security plugin and ensure approval workflows are enforced
  • Consider temporarily disabling folder-level library functionality until patching is complete

Patch Information

Jenkins has released a security advisory addressing this vulnerability. Organizations should upgrade the Templating Engine Plugin to the latest available version that includes the sandbox enforcement fix. Refer to the Jenkins Security Advisory #SECURITY-3505 for specific version information and upgrade instructions.

Workarounds

  • Restrict Item/Configure permissions to only trusted administrators until the plugin can be upgraded
  • Disable or remove folder-level library definitions if they are not essential to operations
  • Implement additional network segmentation around the Jenkins controller to limit blast radius
  • Use Jenkins Pipeline Shared Libraries from external, controlled repositories instead of folder-defined libraries
bash
# Review users with Item/Configure permission
# Check Jenkins configuration for Templating Engine plugin version
jenkins-cli.sh list-plugins | grep templating-engine

# Backup Jenkins configuration before upgrading
tar -czvf jenkins-backup-$(date +%Y%m%d).tar.gz $JENKINS_HOME

# Update the plugin via CLI (after downloading patched version)
jenkins-cli.sh install-plugin templating-engine -restart

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechJenkins

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.28%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Vendor Resources
  • Jenkins Security Advisory #SECURITY-3505
  • Related CVEs
  • CVE-2025-53652: Jenkins Git Parameter RCE Vulnerability

  • CVE-2023-27899: Jenkins RCE Vulnerability via File Upload

  • CVE-2022-20617: Jenkins Docker Commons RCE Vulnerability

  • CVE-2021-21696: Jenkins RCE Vulnerability via Agent Access
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