CVE-2024-23897 in jenkins

LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.

What the vulnerability is

Jenkins 2.441 and earlier, LTS 2.426.2 and earlier does not disable a feature of its CLI command parser that replaces an '@' character followed by a file path in an argument with the file's contents, allowing unauthenticated attackers to read arbitrary files on the Jenkins controller file system.

Affected software: jenkins

Scores

What LogPulse has for it

How to mitigate it

Upgrade Jenkins to 2.442 / LTS 2.426.3 / LTS 2.440.1 or later for the CLI file read (CVE-2024-23897)

Patch or upgrade. The Jenkins CLI expands @file arguments, so unauthenticated users read files from the controller, including secrets that lead to code execution; ransomware groups used it. Jenkins 2.442, LTS 2.426.3 and LTS 2.440.1 disable this.

Applies to: Jenkins 2.441 and earlier, LTS 2.426.2 and earlier.

  1. Check the Jenkins version in Manage Jenkins, About Jenkins.
  2. Upgrade to weekly Jenkins 2.442 or later, or LTS 2.426.3 / 2.440.1 or later (note: weekly 2.441 is still vulnerable).
  3. Until upgraded, disable the CLI (block /cli on the reverse proxy and turn off the CLI as the advisory describes; no restart needed).
  4. Do not set the Java system property hudson.cli.CLICommand.allowAtSyntax=true after upgrading; it re-enables the vulnerable behaviour.
  5. Rotate credentials and secrets stored on the controller (secrets/master.key, credentials.xml) if it was exposed.

Sources:

Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.

We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.

Start free with LogPulse