Detect CVE-2024-23897: Jenkins Arbitrary File Read via CLI Argument Parser (Pre-Auth RCE Chain) in IBM QRadar
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
QRadar Detection Query
SELECT
DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') AS event_time,
sourceip,
destinationip,
destinationport,
URL,
'CVE-2024-23897' AS cve_id,
'critical' AS severity,
QIDNAME(qid) AS event_name,
logsourcename(logsourceid) AS log_source,
"username",
magnitude
FROM events
WHERE
LOGSOURCETYPENAME(devicetype) IN ('Apache HTTP Server', 'NGINX', 'Microsoft IIS', 'Palo Alto Networks Firewall', 'Cisco ASA', 'Snort')
AND (
URL ILIKE '%/cli%'
OR URL ILIKE '%/remoting/legacy%'
)
AND (
URL ILIKE '%@../%'
OR URL ILIKE '%@/etc/%'
OR URL ILIKE '%@/root%'
OR URL ILIKE '%@%secret%'
OR URL ILIKE '%@%passwd%'
OR URL ILIKE '%@%credential%'
OR URL ILIKE '%@%id_rsa%'
)
AND LAST 7 DAYS
ORDER BY starttime DESC
LIMIT 1000 QRadar AQL query detecting CVE-2024-23897 exploitation by searching HTTP log sources for requests to Jenkins CLI/remoting endpoints with '@'-prefixed path traversal or sensitive file read patterns in the URL. Covers web server and network security log source types.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate Jenkins CLI automation jobs running with '@' file arguments for pipeline configuration
- Authorized vulnerability scanners registered in the QRadar reference set of approved scanner IPs
- CI/CD orchestration tools (Ansible, Terraform) that interact with Jenkins CLI endpoints
- Internal monitoring agents performing uptime checks against Jenkins service URLs
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.