Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.jenkins-ci.plugins/templating-engine
  4. ›
  5. CVE-2025-31722

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

April 2, 2025

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.

References

  • github.com/advisories/GHSA-4vjp-327p-w4qv
  • github.com/jenkinsci/templating-engine-plugin
  • github.com/jenkinsci/templating-engine-plugin/commit/bb2b4468b3bf4cea494afb8549af4e6450972653
  • nvd.nist.gov/vuln/detail/CVE-2025-31722
  • www.jenkins.io/security/advisory/2025-04-02/

Code Behaviors & Features

Detect and mitigate CVE-2025-31722 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.5.4

Fixed versions

  • 2.5.4

Solution

Upgrade to version 2.5.4 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

maven/org.jenkins-ci.plugins/templating-engine/CVE-2025-31722.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 00:15:11 +0000.