Thursday, February 27, 2025
HomeCyber Security NewsExploit Released for Critical Jenkins RCE Flaw

Exploit Released for Critical Jenkins RCE Flaw

Published on

SIEM as a Service

Follow Us on Google News

Jenkins has been discovered with a critical vulnerability that is associated with arbitrary code execution that threat actors can exploit for malicious purposes.

The vulnerability is tracked as CVE-2024-23898, and the severity is yet to be categorized.

However, Jenkins has fixed this vulnerability on their latest versions, 2.442 and LTS 2.426.3. Jenkins currently has a market share of 44% as of 2023, which means that the potential impact of exploiting this vulnerability can be catastrophic.

Document
Run Free ThreatScan on Your Mailbox

AI-Powered Protection for Business Email Security

Trustifi’s Advanced threat protection prevents the widest spectrum of sophisticated attacks before they reach a user’s mailbox. Try Trustifi Free Threat Scan with Sophisticated AI-Powered Email Protection .

CVE-2024-23898: Cross-Site WebSocket hijacking

This particular vulnerability exists due to the lack of origin validation of requests that are made through the CLI WebSocket endpoint, which could allow a threat actor to execute CLI commands on the Jenkins controller. Moreover, the vulnerability has specific criteria which must be met for an attacker to exploit it.

This vulnerability is dependent on the fact that most browsers do not implement a “lax by default” policy, which serves as a potential safeguard against this vulnerability. Nevertheless, the exploitation of this vulnerability requires a malicious link to be sent to the victim, and a user interaction is mandatory.

According to the reports shared with Cyber Security News by SonarSource, one of the methods to invoke the Jenkins-CLI command is by using web sockets.

Jenkins-CLI allows users to execute custom commands that are implemented in the Hudson/CLI directory of the Jenkins Git repository.

The most common way of invoking a command is using Jenkins-cli.jar or SSH. However, there was another method discovered that invokes commands by sending two POST requests to http://jenkins/cli?remoting=false.

When a CLI command is invoked, Jenkins uses args4j’s parseArgument, which calls expandAtFiles. If an attacker can control the arguments, it can be expanded to an arbitrary number of ones from an arbitrary file on the Jenkins instance.

Exploitation method (Source: Sonarsource)

Exploitation

Moreover, this arbitrary command execution combines a Data-leak vulnerability (CVE-2024-23897) with a similar background. CVE-2024-23897 exists due to a similar reason but is associated with leaking the contents of an arbitrary file on the Jenkins instance.

Numerous researchers have replicated several attack scenarios and have produced functional proof-of-concept (PoC) exploits that have been made available to the public on GitHub.

However, this Data-leak vulnerability is leveraged for reading the contents of the file in order to find the arbitrary number of arguments, which is later used in the exploitation of Remote Code Execution.

In addition, the success rate of arbitrary code execution over the Jenkins instance is dependent on different contexts. Some of the interesting files that are evident for successful exploitation are 

  • SSH keys
  • /etc/passwd, /etc/shadow
  • Project secrets and credentials (refer to Jenkins’ advisory for more information)
  • Source code, build artifacts
  • and more… 
Gurubaran
Gurubaran
Gurubaran is a co-founder of Cyber Security News and GBHackers On Security. He has 10+ years of experience as a Security Consultant, Editor, and Analyst in cybersecurity, technology, and communications.

Latest articles

VS Code Extension with 9 Million Installs Attacks Developers with Malicious Code

Microsoft has removed two widely-used Visual Studio Code (VS Code) extensions, “Material Theme Free”...

New Anubis Ransomware Targets Windows, Linux, NAS, and ESXi x64/x32 Environments

A new ransomware group, dubbed Anubis, has emerged as a significant threat in the...

WordPress Admins Warned of Fake Plugins Injecting Malicious Links into Websites

A new wave of cyberattacks targeting WordPress websites has been uncovered, with attackers leveraging...

LARVA-208 Hackers Compromise 618 Organizations Stealing Logins and Deploying Ransomware

A newly identified cybercriminal group, LARVA-208, also known as EncryptHub, has successfully infiltrated 618...

Supply Chain Attack Prevention

Free Webinar - Supply Chain Attack Prevention

Recent attacks like Polyfill[.]io show how compromised third-party components become backdoors for hackers. PCI DSS 4.0’s Requirement 6.4.3 mandates stricter browser script controls, while Requirement 12.8 focuses on securing third-party providers.

Join Vivekanand Gopalan (VP of Products – Indusface) and Phani Deepak Akella (VP of Marketing – Indusface) as they break down these compliance requirements and share strategies to protect your applications from supply chain attacks.

Discussion points

Meeting PCI DSS 4.0 mandates.
Blocking malicious components and unauthorized JavaScript execution.
PIdentifying attack surfaces from third-party dependencies.
Preventing man-in-the-browser attacks with proactive monitoring.

More like this

VS Code Extension with 9 Million Installs Attacks Developers with Malicious Code

Microsoft has removed two widely-used Visual Studio Code (VS Code) extensions, “Material Theme Free”...

New Anubis Ransomware Targets Windows, Linux, NAS, and ESXi x64/x32 Environments

A new ransomware group, dubbed Anubis, has emerged as a significant threat in the...

WordPress Admins Warned of Fake Plugins Injecting Malicious Links into Websites

A new wave of cyberattacks targeting WordPress websites has been uncovered, with attackers leveraging...