CVE-2025-31722: Jenkins Templating Engine Plugin Arbitrary Code Execution Vulnerability

Summary

02/04/2025
Yes i
High
8.8

CVE-2025-31722: Jenkins Templating Engine Plugin Vulnerable to Arbitrary Code Execution. Affects org.jenkins-ci.plugins:templating-engine versions < 2.5.4. Fixed in 2.5.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Jenkins Templating Engine Plugin is a powerful tool that allows users to define libraries for use in Jenkins pipelines. It supports both global configurations, which are trusted and managed by administrators, and folder-scoped configurations, which can be modified by users with specific permissions. This flexibility, while beneficial for development, introduces potential security risks if not properly managed.

Vulnerability Detail

The vulnerability arises from the fact that libraries defined in folders are not subject to sandbox protection in versions 2.5.3 and earlier of the Templating Engine Plugin. This oversight allows users with Item/Configure permissions to execute arbitrary code within the Jenkins controller JVM, posing a significant security risk. Attackers could exploit this vulnerability to gain unauthorized access or control over the Jenkins environment, leading to potential data breaches or service disruptions.

How To Fix

Minimum fixed version

2.5.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can restrict Item/Configure permissions to trusted users only, thereby minimizing the risk of arbitrary code execution until the plugin is updated.

Conclusion

The Jenkins Templating Engine Plugin has a critical vulnerability that allows for arbitrary code execution due to inadequate sandbox protection in earlier versions. It is crucial to update to version 2.5.4 or later to secure your Jenkins environment. Additionally, using tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for org.jenkins-ci.plugins:templating-engine →

Share this vulnerability

FAQ

It is a plugin that allows users to define and manage libraries for Jenkins pipelines, enhancing the flexibility and reusability of code.

It allows attackers with specific permissions to execute arbitrary code on the Jenkins controller JVM, potentially compromising the entire Jenkins environment.

You can use the Vulert playground at Vulert Scanner to check for vulnerabilities in your application without needing to sign up.

The CVSS score for this vulnerability is 8.8, indicating a high severity level.

If an immediate update is not possible, restrict permissions for Item/Configure to trusted users to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for org.jenkins-ci.plugins:templating-engine.

How To Fix

Minimum fixed version

2.5.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback