CVE-2025-31722: Code Injection
In Jenkins Templating Engine Plugin 2.5.3 and earlier, libraries defined in folders are not subject to sandbox protection, allowing attackers with Item/Configure permission to execute arbitrary code in the context of the Jenkins controller JVM.
Other sources
Jenkins Templating Engine Plugin allows defining libraries both in the global configuration, as well as scoped to folders containing the pipelines using them. While libraries in the global configuration can only be set up by administrators and can therefore be trusted, libraries defined in folders can be configured by users with Item/Configure permission.
In Templating Engine Plugin 2.5.3 and earlier, libraries defined in folders are not subject to sandbox protection. This vulnerability allows attackers with Item/Configure permission to execute arbitrary code in the context of the Jenkins controller JVM.
In Templating Engine Plugin 2.5.4, libraries defined in folders are subject to sandbox protection.
— GitHub
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-31722?
CVE-2025-31722 is classified as a critical vulnerability due to its potential to allow arbitrary code execution.
How do I fix CVE-2025-31722?
To fix CVE-2025-31722, upgrade the Jenkins Templating Engine Plugin to version 2.5.4 or later.
What types of access are required to exploit CVE-2025-31722?
An attacker needs Item/Configure permission to exploit CVE-2025-31722.
Which versions of the Jenkins Templating Engine Plugin are affected by CVE-2025-31722?
CVE-2025-31722 affects Jenkins Templating Engine Plugin versions up to and including 2.5.3.
What risk does CVE-2025-31722 pose to my Jenkins instance?
CVE-2025-31722 poses a risk of arbitrary code execution in the Jenkins controller JVM, compromising the entire system.