CVE-2024-43044: Remoting Jenkins Remoting Library Arbitrary File Vulnerability

HIGH
Advisory Identifier: GHSA-h856-ffvv-xvr4
CVSS 9.0
CWE-22 CWE-754
Published
Advisory Summary

CVE-2024-43044 is a HIGH (CVSS 9.0) jenkins remoting library arbitrary file vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Remoting libraries in the Maven ecosystem. The issue involves jenkins remoting library arbitrary file read vulnerability. Remediation is available by upgrading affected packages to version 3206.3208, 3248.3250, 3256.3258, 2.452.4, 2.462.1, 2.471.

CVE-2024-43044 at a Glance

CVE Identifier CVE-2024-43044
GHSA Identifier GHSA-h856-ffvv-xvr4
Severity HIGH
CVSS v3.1 Base Score 9.0
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Remoting
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-43044

To remediate this vulnerability, upgrade all affected Remoting dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.jenkins-ci.main:remoting fixed: 3206.3208
<dependency>
    <groupId>org.jenkins-ci.main</groupId>
    <artifactId>remoting</artifactId>
    <version>3206.3208</version>
</dependency>
org.jenkins-ci.main:remoting fixed: 3248.3250
<dependency>
    <groupId>org.jenkins-ci.main</groupId>
    <artifactId>remoting</artifactId>
    <version>3248.3250</version>
</dependency>
org.jenkins-ci.main:remoting fixed: 3256.3258
<dependency>
    <groupId>org.jenkins-ci.main</groupId>
    <artifactId>remoting</artifactId>
    <version>3256.3258</version>
</dependency>
org.jenkins-ci.main:jenkins-core fixed: 2.452.4
<dependency>
    <groupId>org.jenkins-ci.main</groupId>
    <artifactId>jenkins-core</artifactId>
    <version>2.452.4</version>
</dependency>
org.jenkins-ci.main:jenkins-core fixed: 2.462.1
<dependency>
    <groupId>org.jenkins-ci.main</groupId>
    <artifactId>jenkins-core</artifactId>
    <version>2.462.1</version>
</dependency>
org.jenkins-ci.main:jenkins-core fixed: 2.471
<dependency>
    <groupId>org.jenkins-ci.main</groupId>
    <artifactId>jenkins-core</artifactId>
    <version>2.471</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.jenkins-ci.main

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2024-43044, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.jenkins-ci.main

Analyze the terminal output to locate any version of Remoting in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3206.3208), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.jenkins-ci.main command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Remoting, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Jenkins uses the Remoting library (typically `agent.jar` or `remoting.jar`) for the communication between controller and agents. This library allows agents to load classes and classloader resources from the controller, so that Java objects sent from the controller (build steps, etc.) can be executed on agents. In addition to individual class and resource files, Remoting also allows Jenkins plugins to transmit entire jar files to agents using the `Channel#preloadJar` API. As of publication of this advisory, this feature is used by the following plugins distributed by the Jenkins project: bouncycastle API, Groovy, Ivy, TeamConcert In Remoting 3256.v88a_f6e922152 and earlier, except 3206.3208.v409508a_675ff and 3248.3250.v3277a_8e88c9b_, included in Jenkins 2.470 and earlier, LTS 2.452.3 and earlier, calls to `Channel#preloadJar` result in the retrieval of files from the controller by the agent using `ClassLoaderProxy#fetchJar`. Additionally, the implementation of `ClassLoaderProxy#fetchJar` invoked on the controller does not restrict paths that agents could request to read from the controller file system. This allows agent processes, code running on agents, and attackers with Agent/Connect permission to read arbitrary files from the Jenkins controller file system. The Remoting library in Jenkins 2.471, LTS 2.452.4, LTS 2.462.1 now sends jar file contents with `Channel#preloadJar` requests, the only use case of `ClassLoaderProxy#fetchJar` in agents, so that agents do not need to request jar file contents from controllers anymore. To retain compatibility with older versions of Remoting in combination with the plugins listed above, `ClassLoaderProxy#fetchJar` is retained and otherwise unused, just deprecated. Its implementation in Jenkins 2.471, LTS 2.452.4, LTS 2.462.1 was changed so that it is now limited to retrieving jar files referenced in the core classloader or any plugin classloader.

CVE-2024-43044 Affected Remoting Versions

6 component(s)
Fixed Versions:
3206.32083248.32503256.32582.452.42.462.12.471
Product / Package Ecosystem Affected Versions Fixed Version
org.jenkins-ci.main:remoting
Maven
< 3206.3208
3206.3208
org.jenkins-ci.main:remoting
Maven
≥ 3248
< 3248.3250
3248.3250
org.jenkins-ci.main:remoting
Maven
≥ 3256
< 3256.3258
3256.3258
org.jenkins-ci.main:jenkins-core
Maven
< 2.452.4
2.452.4
org.jenkins-ci.main:jenkins-core
Maven
≥ 2.460
< 2.462.1
2.462.1
org.jenkins-ci.main:jenkins-core
Maven
≥ 2.470
< 2.471
2.471

References

Frequently Asked Questions

What is CVE-2024-43044?
CVE-2024-43044 is a security vulnerability in Remoting involving Jenkins Remoting library arbitrary file read vulnerability under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Remoting versions are affected?
Affected versions include releases prior to 3206.3208, 3248.3250, 3256.3258, 2.452.4, 2.462.1, 2.471 across affected packages: org.jenkins-ci.main:remoting, org.jenkins-ci.main:jenkins-core.
What version fixes CVE-2024-43044?
Upgrading to 3206.3208, 3248.3250, 3256.3258, 2.452.4, 2.462.1, 2.471 (or the latest patched release for your respective branch) resolves the vulnerability.
Is remoting affected?
Yes, org.jenkins-ci.main:remoting is affected in releases prior to 3206.3208, 3248.3250, 3256.3258. Upgrade your dependency to 3206.3208, 3248.3250, 3256.3258 or later.
Is jenkins-core affected?
Yes, org.jenkins-ci.main:jenkins-core is affected in releases prior to 2.452.4, 2.462.1, 2.471. Upgrade your dependency to 2.452.4, 2.462.1, 2.471 or later.
What is the CVSS score of CVE-2024-43044?
CVE-2024-43044 has a CVSS v3.1 base score of 9.0 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2024-43044?
CVE-2024-43044 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Maven dependencies for CVE-2024-43044?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.jenkins-ci.main'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h856-ffvv-xvr4",
  "modified" : "2024-11-18T16:27:00Z",
  "published" : "2024-08-07T15:30:42Z",
  "aliases" : [ "CVE-2024-43044" ],
  "summary" : "Jenkins Remoting library arbitrary file read vulnerability",
  "details" : "Jenkins uses the Remoting library (typically `agent.jar` or `remoting.jar`) for the communication between controller and agents. This library allows agents to load classes and classloader resources from the controller, so that Java objects sent from the controller (build steps, etc.) can be executed on agents.\n\nIn addition to individual class and resource files, Remoting also allows Jenkins plugins to transmit entire jar files to agents using the `Channel#preloadJar` API. As of publication of this advisory, this feature is used by the following plugins distributed by the Jenkins project: bouncycastle API, Groovy, Ivy, TeamConcert\n\nIn Remoting 3256.v88a_f6e922152 and earlier, except 3206.3208.v409508a_675ff and 3248.3250.v3277a_8e88c9b_, included in Jenkins 2.470 and earlier, LTS 2.452.3 and earlier, calls to `Channel#preloadJar` result in the retrieval of files from the controller by the agent using `ClassLoaderProxy#fetchJar`. Additionally, the implementation of `ClassLoaderProxy#fetchJar` invoked on the controller does not restrict paths that agents could request to read from the controller file system.\n\nThis allows agent processes, code running on agents, and attackers with Agent/Connect permission to read arbitrary files from the Jenkins controller file system.\n\nThe Remoting library in Jenkins 2.471, LTS 2.452.4, LTS 2.462.1 now sends jar file contents with `Channel#preloadJar` requests, the only use case of `ClassLoaderProxy#fetchJar` in agents, so that agents do not need to request jar file contents from controllers anymore.\n\nTo retain compatibility with older versions of Remoting in combination with the plugins listed above, `ClassLoaderProxy#fetchJar` is retained and otherwise unused, just deprecated. Its implementation in Jenkins 2.471, LTS 2.452.4, LTS 2.462.1 was changed so that it is now limited to retrieving jar files referenced in the core classloader or any plugin classloader.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.main:remoting"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3206.3208"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.main:remoting"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3248"
      }, {
        "fixed" : "3248.3250"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.main:remoting"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3256"
      }, {
        "fixed" : "3256.3258"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.main:jenkins-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.452.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.main:jenkins-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.460"
      }, {
        "fixed" : "2.462.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.main:jenkins-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.470"
      }, {
        "fixed" : "2.471"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-43044"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jenkinsci/jenkins/commit/3f54c41b40db9e4ae7afa4209bc1ea91bb9175c0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jenkinsci/jenkins/commit/5d26b53ad3a5cd8c4a060eef4f56d75e65ca17a5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jenkinsci/jenkins/commit/cec49ce5d58048f66ac3fa88409a0d38dec09bf0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jenkinsci/remoting/commit/3277a8e88c9b807b9a989bd7e9176d2ec9834e47"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jenkinsci/remoting/commit/409508a675ffc4ed9681e30bb46c8d9cb375b78c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jenkinsci/remoting/commit/858f3c9af69d4d216b26551ea51dde6e67479bb3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jenkinsci/remoting"
  }, {
    "type" : "WEB",
    "url" : "https://www.jenkins.io/security/advisory/2024-08-07/#SECURITY-3430"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-754" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-07T18:12:59Z",
    "nvd_published_at" : "2024-08-07T14:15:33Z"
  }
}