Detect CVE-2024-23897: Jenkins Arbitrary File Read via CLI Argument Parser (Pre-Auth RCE Chain) in Sumo Logic CSE
CVE-2024-23897 is a critical path traversal vulnerability (CWE-22) in Jenkins' built-in CLI argument parser (args4j). The parser expands file contents prefixed with '@' as command arguments, allowing unauthenticated attackers to read arbitrary files from the Jenkins controller filesystem — including secrets, credentials, and SSH keys. When combined with additional weaknesses (e.g., exposed Remember Me tokens or cryptographic keys), this chain enables unauthenticated remote code execution. CVSS 9.8. Actively exploited (CISA KEV). Affects Jenkins <= 2.441 and LTS <= 2.426.2.
MITRE ATT&CK
Sumo Detection Query
_sourceCategory=*jenkins* OR _sourceCategory=*web/access* OR _sourceCategory=*nginx* OR _sourceCategory=*apache* OR _sourceCategory=*iis*
| parse regex "(?<src_ip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})" nodrop
| parse regex "\"(?<method>GET|POST|HEAD|PUT|DELETE|OPTIONS|PATCH) (?<uri>[^\s]+)" nodrop
| parse regex "\s(?<status_code>\d{3})\s" nodrop
| where (uri matches "/cli*" or uri matches "*/remoting/legacy*")
and (
uri matches "*@../*"
or uri matches "*@/etc/*"
or uri matches "*@/root*"
or uri matches "*@*secret*"
or uri matches "*@*passwd*"
or uri matches "*@*credential*"
or uri matches "*@*id_rsa*"
)
| eval cve = "CVE-2024-23897"
| eval risk = if(method == "POST", "high", "medium")
| count as hit_count by src_ip, uri, method, status_code, cve, risk
| sort by hit_count desc Sumo Logic query detecting CVE-2024-23897 exploitation attempts across Jenkins and web access log sources. Parses source IP, HTTP method, and URI, then filters for CLI endpoint requests containing '@'-prefixed path traversal or sensitive file patterns. Aggregates by attacker IP for triage prioritization.
Data Sources
Required Tables
False Positives & Tuning
- Jenkins CLI scripts embedded in legitimate pipeline definitions that reference local configuration files with '@' prefix
- Monitoring integrations that query Jenkins CLI health endpoints from known IP ranges
- Authorized red team or penetration testing activity from tracked source IPs
- WAF-forwarded test traffic from security vendors performing SaaS scanning
Other platforms for CVE-2024-23897
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Unauthenticated Jenkins CLI File Read via args4j @ Expansion
Expected signal: POST request to /cli with '@/etc/passwd' in body; HTTP 200 response with non-empty body containing passwd file contents; OS-level file open event for /etc/passwd initiated by jenkins process
- Test 2Jenkins master.key Extraction for Credential Decryption
Expected signal: Three sequential POST requests to /cli targeting secrets/master.key, secrets/hudson.util.Secret, and credentials.xml; file access events (auditd/Sysmon) for all three files initiated by the Jenkins JVM process; HTTP 200 responses with non-trivial body sizes
- Test 3Jenkins CLI Path Traversal via Remoting Legacy Endpoint
Expected signal: POST requests to /remoting/legacy and /cli with '@' file arguments; path traversal sequences in URI or body; file access events for .ssh/id_rsa; HTTP responses with key material in body
Unlock Pro Content
Get the full detection package for CVE-2024-23897 including response playbook, investigation guide, and atomic red team tests.