Jenkins Pipeline: Groovy Plugin (workflow-cps) version 2.63 and earlier contains a sandbox bypass vulnerability in CpsGroovyShell.java. During parsing, compilation, and script instantiation of CPS-transformed pipeline scripts, sandbox protections are not applied, allowing authenticated users with Overall/Read permission to execute arbitrary code on the Jenkins controller JVM.
PoC
id: CVE-2019-1003030
info:
name: Jenkins Pipeline Groovy Plugin <=2.63 - Insecure Deserialization
author: princechaddha
severity: critical
description: |
Jenkins Pipeline: Groovy Plugin (workflow-cps) version 2.63 and earlier contains a sandbox bypass vulnerability in CpsGroovyShell.java. During parsing, compilation, and script instantiation of CPS-transformed pipeline scripts, sandbox protections are not applied, allowing authenticated users with Overall/Read permission to execute arbitrary code on the Jenkins controller JVM.
impact: |
Low-privilege authenticated users (requiring only Overall/Read) can bypass the Groovy sandbox and execute arbitrary OS commands on the Jenkins controller. This leads to full CI/CD pipeline compromise: credential theft, SSH key extraction, arbitrary node execution, and supply chain attacks via poisoned build artifacts.
remediation: |
Upgrade Pipeline: Groovy Plugin (workflow-cps) to version 2.64 or later. If upgrading is not immediately possible, restrict Overall/Read access to trusted users only, or disable Pipeline job creation for untrusted users.
reference:
- https://www.jenkins.io/security/advisory/2019-03-06/#SECURITY-1336
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1003030
- https://github.com/overgrowncarrot1/CVE-2019-1003030
- https://nvd.nist.gov/vuln/detail/CVE-2019-1003030
- http://packetstormsecurity.com/files/159603/Jenkins-2.63-Sandbox-Bypass.html
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
cvss-score: 9.9
cve-id: CVE-2019-1003030
cwe-id: CWE-693
epss-score: 0.96868
epss-percentile: 0.99885
cpe: cpe:2.3:a:jenkins:pipeline_groovy:*:*:*:*:*:jenkins:*:*
metadata:
verified: true
max-request: 2
vendor: jenkins
product: workflow-cps
framework: jenkins
shodan-query: http.favicon.hash:81586312
fofa-query: icon_hash=81586312
tags: cve,cve2019,jenkins,plugin,sandbox-bypass,rce,authenticated,kev,vkev,vuln,passive
flow: http(1) && http(2)
http:
- method: GET
path:
- "{{BaseURL}}"
- "{{BaseURL}}/login"
host-redirects: true
max-redirects: 2
stop-at-first-match: true
matchers:
- type: word
part: header
words:
- "X-Jenkins"
case-insensitive: true
internal: true
extractors:
- type: kval
name: jenkins_ver
kval:
- x_jenkins
internal: true
- method: GET
path:
- "{{BaseURL}}/pluginManager/api/json?depth=1&tree=plugins[shortName,version,active]"
matchers-condition: and
matchers:
- type: word
part: body
words:
- "workflow-cps"
- type: dsl
dsl:
- 'compare_versions(cps_ver, "<= 2.63")'
- type: status
status:
- 200
extractors:
- type: regex
name: cps_ver
part: body
regex:
- '"workflow-cps"[^}]*?"version"\s*:\s*"([^"]+)"'
group: 1
internal: true
- type: dsl
dsl:
- '"Jenkins " + jenkins_ver + ""'
# digest: 4a0a00473045022020bfff6bf2d2a8e501b5331370d68f9513172fa406347bf8bb34091f92939058022100c65f10cd4c49ce3c1d57d3b32c47183e8867823401f80501843633c4375ee975:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.