CVE-2025-31722 is an arbitrary code execution vulnerability in Jenkins Templating Engine Plugin 2.5.3 and earlier. The flaw affects the handling of libraries defined at the folder scope: unlike globally defined libraries, these folder-scoped libraries are not subjected to the Jenkins Script Security sandbox. As a result, an attacker with Item/Configure permission can define or modify a folder-scoped library so that unsandboxed code is executed during pipeline processing. This results in arbitrary code execution in the context of the Jenkins controller JVM.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).
This repository is a small standalone Python proof-of-concept for CVE-2025-31722, a sandbox bypass leading to remote code execution in the Jenkins Templating Engine plugin <= 2.5.3. The repository contains only two files: a README describing the vulnerability, prerequisites, attack flow, and usage; and a single executable script, exploit.py, which implements the full exploit chain. The exploit is not part of a larger framework. Its structure is straightforward: exploit.py defines helper functions for status output, XML generators for Jenkins folder and job configuration, and a JenkinsExploit class that orchestrates the attack. The class stores target connection details, builds an attacker-controlled git:// URL, authenticates to Jenkins using HTTP Basic Auth, creates a malicious local git repository containing a Groovy step, starts a git daemon on TCP/9418, creates a Jenkins folder configured with a JTE GovernanceTier pointing to that repository, creates a job using AdHocTemplateFlowDefinition that loads the malicious library and calls the evil() step, triggers the build, polls for completion, and prints the console output to expose command execution results. A cleanup mode removes the created Jenkins folder/job and local repository artifacts. The main exploit capability is authenticated RCE on the Jenkins server as the Jenkins service user. It relies on a low-privileged user being able to create/configure/build jobs and on Jenkins being able to fetch libraries from an attacker-controlled git daemon. The payload is operational rather than just demonstrative because it supports arbitrary command execution via the --cmd parameter, with a default command of `id && hostname && cat /etc/passwd`. The exploit also fingerprints several Jenkins web endpoints used for object creation, build triggering, console retrieval, and deletion, as well as the attacker-side git service and local filesystem paths used to host the malicious library.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
4 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.