Exploit
CVE-2024-31982

Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') (CWE-95)

Published: Apr 10, 2024

010
CVSS 10EPSS 0.05%Critical
CVE info copied to clipboard

Summary

XWiki's database search feature contains a vulnerability that allows remote code execution through the search text. This vulnerability affects both public and private wikis, as the database search is accessible to all users by default. An attacker can craft a malicious search query that executes arbitrary code on the server, compromising the entire XWiki installation. The vulnerability can be exploited without authentication, making it particularly dangerous.

Impact

The impact of this vulnerability is severe and far-reaching: 1. Complete system compromise: An attacker can gain full control over the vulnerable XWiki server by executing arbitrary code. 2. Data breach: Sensitive information stored in the wiki could be accessed and exfiltrated. 3. System takeover: The attacker could gain control over the server hosting the XWiki installation. 4. Malicious activities: The compromised server could be used for unauthorized activities such as cryptocurrency mining, ransomware deployment, or as a launchpad for further network intrusion. 5. Loss of confidentiality, integrity, and availability: The vulnerability affects the core functionality and trust of the entire application. The severity is underscored by its CVSS v3.1 base score of 10.0, which is the highest possible score, indicating critical severity. The attack vector is network-based, requires low complexity, no privileges, and no user interaction, with the potential to change the scope of the attack.

Exploitation

Multiple proof-of-concept exploits are available on github.com, github.com, github.com. Its exploitation has been reported by various sources, including github.com.

Patch

A patch is available to address this vulnerability. It was released on 2024-04-10, as per the Github Advisory. It is critical to apply this patch as soon as possible on all affected XWiki installations to mitigate the risk.

Mitigation

Until the patch can be applied, consider the following mitigation strategies: 1. Restrict access to the /xwiki/bin/get/Main/DatabaseSearch page to only trusted users and IPs. 2. If the database search feature is not critical, consider disabling it temporarily. 3. Implement strong authentication and access control mechanisms. 4. Monitor for suspicious activities or unauthorized access attempts. 5. Regularly backup XWiki data to ensure quick recovery in case of a successful attack. However, applying the official patch should be prioritized as the primary and most effective mitigation strategy. Given the critical nature of this vulnerability and the availability of multiple proof-of-concept exploits, patching should be treated as an urgent priority.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Timeline

Vendor Advisory

GitHub Advisories released a security advisory.

Apr 10, 2024 at 7:38 AM
Detection in Vulnerability Scanners

Detection for the vulnerability has been added to Qualys (998037)

Apr 10, 2024 at 7:53 AM
CVSS

A CVSS base score of 10 has been assigned.

Apr 10, 2024 at 5:21 PM / github_advisories
First Article

Feedly found the first article mentioning CVE-2024-31982. See article

Apr 10, 2024 at 5:24 PM / GitHub Advisory Database
CVE Assignment

NVD published the first details for CVE-2024-31982

Apr 10, 2024 at 8:15 PM
EPSS

EPSS Score was set to: 0.05% (Percentile: 13.8%)

Apr 11, 2024 at 9:55 AM
CVSS Estimate

Feedly estimated the CVSS score as HIGH

Jun 23, 2024 at 1:40 AM
Exploitation in the Wild

Attacks in the wild have been reported by PoC-in-GitHub RSS. See article

Jun 23, 2024 at 7:42 AM / PoC-in-GitHub RSS
Proof of Concept (PoC) Released

A proof of concept exploit has been released

Jun 23, 2024 at 7:10 PM
Static CVE Timeline Graph

Affected Systems

Xwiki/xwiki
+null more

Exploits

https://github.com/bigb0x/CVE-2024-31982
+null more

Patches

Github Advisory
+null more

Attack Patterns

CAPEC-35: Leverage Executable Code in Non-Executable Files
+null more

Vendor Advisory

[GHSA-2858-8cfx-69m9] XWiki Platform: Remote code execution as guest via DatabaseSearch
GitHub Security Advisory: GHSA-2858-8cfx-69m9 Release Date: 2024-04-10 Update Date: 2024-04-10 Severity: Critical CVE-2024-31982 Base Score: 10.0 Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H Package Information Package: org.xwiki.platform:xwiki-platform-search-ui Affected Versions: >= 2.4-milestone-1, Patched Versions: 14.10.20 Description XWiki's database search allows remote code execution through the search text.

News

About Remote Code Execution – XWiki Platform (CVE-2024-31982) vulnerability
About Remote Code Execution – XWiki Platform (CVE-2024-31982) vulnerability. XWiki is a free open-source wiki platform. Its main feature is simplified extensibility. XWiki is often used in corporate environments as a replacement for commercial Wiki solutions (such as Atlassian Confluence). A vulnerability with CVSS Base Score 10 , published on April 10 , allows attackers to execute arbitrary code via queries in the XWiki database search interface. This interface is available to all users by default and complements the regular XWiki search. If it is not needed, it can be disabled by removing the Main.DatabaseSearch page. The vulnerability is fixed in XWiki versions 14.10.20, 15.5.4 and 15.10RC1. An exploit PoC was provided by XWiki developers in their vulnerability bulletin. Functional scripts for exploiting this vulnerability have been available on GitHub since June 22.
CVE-2024–31982: When a Simple Wiki Search Turns into a RCE Party
Meet CVE-2024–31982, a critical remote code execution (RCE) vulnerability hiding in XWiki’s database search feature. Here’s the deal: XWiki Platform, starting from version 2.4-milestone-1 and prior to versions 4.10.20, 15.5.4, and 15.10-rc-1, has a serious flaw in its database search feature.
CVE-2024–31982: When a Simple Wiki Search Turns into a RCE Party
CVE-2024–31982: When a Simple Wiki Search Turns into a RCE Party
CVE-2024–31982: When a Simple Wiki Search Turns into a RCE Party
Meet CVE-2024–31982, a critical remote code execution (RCE) vulnerability hiding in XWiki’s database search feature. Here’s the deal: XWiki Platform, starting from version 2.4-milestone-1 and prior to versions 4.10.20, 15.5.4, and 15.10-rc-1, has a serious flaw in its database search feature.
See 12 more articles and social media posts

CVSS V3.1

Attack Vector:Network
Attack Complexity:Low
Privileges Required:None
User Interaction:None
Scope:Changed
Confidentiality:High
Integrity:High
Availability Impact:High

Categories

Be the first to know about critical vulnerabilities

Collect, analyze, and share vulnerability reports faster using AI