Detect CVE-2024-23897: Jenkins Arbitrary File Read via CLI Argument Parser (Pre-Auth RCE Chain) in CrowdStrike LogScale
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
LogScale Detection Query
#event_simpleName=NetworkListenPort83 OR #event_simpleName=NetworkReceiveAcceptIP4
| filter LocalPort in (8080, 8443, 443, 80)
| join type=inner
[
#event_simpleName=ProcessRollup2
| filter ImageFileName matches /jenkins/
| filter (CommandLine matches /@\.\.\// or CommandLine matches /@\/etc\// or CommandLine matches /@.*secret/ or CommandLine matches /@.*passwd/ or CommandLine matches /@.*credential/ or CommandLine matches /@.*id_rsa/)
| fields aid, TargetProcessId, CommandLine, ImageFileName, ParentImageFileName, UserName, SHA256HashData
]
on aid
| eval cve = "CVE-2024-23897"
| eval severity = "critical"
| table _time, aid, ComputerName, LocalAddressIP4, RemoteAddressIP4, LocalPort, ImageFileName, CommandLine, ParentImageFileName, UserName, SHA256HashData, cve, severity
| sort - _time CrowdStrike Falcon NG-SIEM query detecting CVE-2024-23897 by correlating Jenkins process executions on the host with command lines containing '@'-prefixed path traversal or sensitive file read patterns (args4j expansion). Also joins network connection events to identify inbound connections to Jenkins ports at the time of exploitation. Covers Windows and Linux hosts.
Data Sources
Required Tables
False Positives & Tuning
- Jenkins pipeline jobs using '@' file expansion in CLI invocations as part of legitimate build automation
- Jenkins plugin installation scripts that reference local configuration files with '@' prefix
- CI/CD agents spawning Jenkins CLI subprocesses for authorized configuration management tasks
- Developers testing Jenkins CLI functionality locally on workstations with file arguments
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.