Jenkins Agents Remote Code Execution Vulnerability (CVE-2024-43044)
A critical remote code execution (RCE) vulnerability, identified as CVE-2024-43044, has been discovered in Jenkins, one of the most widely used automation servers. The vulnerability resides in the ClassLoaderProxy#fetchJar method and could allow attackers to compromise Jenkins environments by exploiting unrestricted file path requests from agents to the Jenkins controller.
Understanding CVE-2024-43044
CVE-2024-43044 is a critical remote code execution (RCE) vulnerability in Jenkins, due to a flaw in the ClassLoaderProxy#fetchJar method within the Remoting/Hudson library used for communication between Jenkins controllers and agents. The vulnerability arises because fetchJar inadequately validates file paths provided by Jenkins agents. An attacker with access to a Jenkins agent can exploit this flaw by crafting a request to the Jenkins controller that includes arbitrary file paths. Specifically, the attacker can manipulate the request to include paths pointing to malicious JAR files, which are not properly sanitized by the fetchJar method.
When the Jenkins controller processes this request, it loads and executes the malicious JAR file, as there are no restrictions on the path or file content. This execution of malicious code occurs with the same privileges as the Jenkins controller process, granting the attacker full control over the Jenkins environment. Exploitation can involve techniques such as uploading a JAR file containing a reverse shell or other malicious payloads, allowing attackers to execute commands on the Jenkins controller. This can lead to unauthorized access to sensitive data, alteration of Jenkins configurations, and significant disruption of operations.
- Severity: Critical
- Impact: The vulnerability allows attackers to potentially compromise the Jenkins environment by leveraging agent secrets or interacting with active processes. This can lead to significant security breaches.
- Affected Versions: All versions of Jenkins prior to
2.471or2.452 LTS
Who is Impacted?
Any organization or individual using Jenkins versions before 2.471 or 2.452 LTS is affected by this vulnerability. Specifically, those who utilize the Jenkins controller/agent model for communication between Jenkins controllers and agents are at risk. The vulnerability impacts environments where agents can request unrestricted file paths, potentially leading to remote code execution.
Patches and Remediation Steps
The recommended fix is to upgrade Jenkins to version 2.471 or later. The update addresses the flaw and enhances the overall security of the Jenkins system.
How Upwind Helps Protect Your Environment
Upwind Cloud Security Platform offers several solutions to mitigate CVE-2024-43044:
- Locate Vulnerable Packages: Use Upwind’s SBOM explorer to search and identify
CVE-2024-43044. - View Resource Impact: Identify all resources affected by
CVE-2024-43044, including cloud accounts, clusters, pods, namespaces, VMs, and resources. - Prioritize At-Risk Resources: Assess and prioritize the impact on your environment, focusing on resources with additional risk factors such as internet exposure, database connections, secrets, or sensitive data.
- Prioritize Package Upgrades: Generate a list of vulnerable resources that should be prioritized for updates using the recommended fixes.

Get Further Assistance
If you need further assistance with protecting your environment from CVE-2024-43044, you can reach out to an Upwind specialist directly at [email protected].
Exploit Appendix
Stage 1: Class Loader and Reader Initialization
Copied
Stage 2: Reading User Information
This stage involves reading user information from Jenkins. The user data is fetched and stored for further processing.
Copied
Stage 3: Defining and Reading File Paths
Paths to sensitive files such as master key, secret key, and MAC file are defined. The corresponding files are then read. The MAC file is crucial for cookie forgery.
Copied
Stage 4: Forging Cookies and Accessing Jenkins Script Console
In this stage, cookies are forged for users and the Jenkins Script Console is accessed using those cookies. Commands or shells are executed as per the user’s input.
Copied
Stage 5: Exporting Users and Exiting
User information is exported, and if no command is provided, the process exits.
Copied


