{"id":"CVE-2024-31982","published":"2024-04-10T19:38:01Z","modified":"2025-09-25T16:39:01Z","title":"XWiki Platform: Remote code execution as guest via DatabaseSearch","vendor":"xwiki","product":"xwiki-platform","tier":"core","eol":null,"affectedVersions":[{"vendor":"xwiki","product":"xwiki-platform","versions":[">= 2.4-milestone-1, < 14.10.20",">= 15.0-rc-1, < 15.5.4",">= 15.6-rc-1, < 15.10-rc-1"]}],"description":{"text":"XWiki Platform is a generic wiki platform. Starting in version 2.4-milestone-1 and prior to versions 4.10.20, 15.5.4, and 15.10-rc-1, XWiki's database search allows remote code execution through the search text. This allows remote code execution for any visitor of a public wiki or user of a closed wiki as the database search is by default accessible for all users. This impacts the confidentiality, integrity and availability of the whole XWiki installation. This vulnerability has been patched in XWiki 14.10.20, 15.5.4 and 15.10RC1. As a workaround, one may manually apply the patch to the page `Main.DatabaseSearch`. Alternatively, unless database search is explicitly used by users, this page can be deleted as this is not the default search interface of XWiki.","provenance":"source","from":"CVE.org"},"summary":{"text":"The XWiki Platform (xwiki-platform) has a remote code execution flaw in its DatabaseSearch component, where the search text is improperly neutralized before being dynamically evaluated. An attacker who can reach the wiki over the network needs no authentication and no user interaction, since the database search is accessible to guests by default on public or closed wikis, so the flaw can be triggered as a visitor with the scope and impact of the whole XWiki installation affected.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-31T12:59:22Z"},"cvss":{"score":10,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.3452,"percentile":0.98414,"date":"2026-10-30","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2024-06-26","exploitedFirstSeen":"2025-03-25","ransomware":false,"evidence":[{"url":"https://isc.sans.edu/diary/XWiki+Search+Vulnerability+exploit+attempts+CVE20243721/31800/","date":"2025-03-25"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-09-10&host_type=src&vulnerability=cve-2024-31982","date":"2026-09-10"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-09-14&host_type=src&vulnerability=cve-2024-31982","date":"2026-09-14"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-09-16&host_type=src&vulnerability=cve-2024-31982","date":"2026-09-16"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-09-18&host_type=src&vulnerability=cve-2024-31982","date":"2026-09-18"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-09-21&host_type=src&vulnerability=cve-2024-31982","date":"2026-09-21"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-09-22&host_type=src&vulnerability=cve-2024-31982","date":"2026-09-22"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-09-25&host_type=src&vulnerability=cve-2024-31982","date":"2026-09-25"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-09-26&host_type=src&vulnerability=cve-2024-31982","date":"2026-09-26"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-09-27&host_type=src&vulnerability=cve-2024-31982","date":"2026-09-27"}],"evidenceTotal":16,"provenance":"source"},"exploited":true,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[{"id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code"}],"references":[{"url":"https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-2858-8cfx-69m9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/xwiki/xwiki-platform/commit/3c9e4bb04286de94ad24854026a09fa967538e31","tags":["x_refsource_MISC"]},{"url":"https://github.com/xwiki/xwiki-platform/commit/459e968be8740c8abc2a168196ce21e5ba93cfb8","tags":["x_refsource_MISC"]},{"url":"https://github.com/xwiki/xwiki-platform/commit/95bdd6cc6298acdf7f8f21298d40eeb8390a8565","tags":["x_refsource_MISC"]},{"url":"https://jira.xwiki.org/browse/XWIKI-21472","tags":["x_refsource_MISC"]},{"url":"https://www.vicarius.io/vsociety/posts/xwiki-rce-cve-2024-31982","tags":[]},{"url":"https://www.vicarius.io/vsociety/posts/cve-2024-31982-detect-xwiki-vulnerability","tags":[]},{"url":"https://www.vicarius.io/vsociety/posts/cve-2024-31982-xwiki-mitigation-vulnerability","tags":[]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-search-ui","vulnerableRanges":[">=2.4-milestone-1, <14.10.20",">=15.0-rc-1, <15.5.4",">=15.6-rc-1, <15.10-rc-1"],"patched":["14.10.20","15.5.4","15.10-rc-1"],"from":["GHSA-2858-8cfx-69m9"],"provenance":"source"}],"advisories":[{"id":"GHSA-2858-8cfx-69m9","url":"https://github.com/advisories/GHSA-2858-8cfx-69m9","severity":"CRITICAL","ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-search-ui","vulnerableRanges":[">=2.4-milestone-1, <14.10.20"],"patched":["14.10.20"],"provenance":"source","from":"GHSA"},{"id":"GHSA-2858-8cfx-69m9","url":"https://github.com/advisories/GHSA-2858-8cfx-69m9","severity":"CRITICAL","ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-search-ui","vulnerableRanges":[">=15.0-rc-1, <15.5.4"],"patched":["15.5.4"],"provenance":"source","from":"GHSA"},{"id":"GHSA-2858-8cfx-69m9","url":"https://github.com/advisories/GHSA-2858-8cfx-69m9","severity":"CRITICAL","ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-search-ui","vulnerableRanges":[">=15.6-rc-1, <15.10-rc-1"],"patched":["15.10-rc-1"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2024-1055","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2024-1055","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":4,"skipped":0,"earliest":"2024-06-22","earliestUrl":"https://github.com/NanoWraith/CVE-2024-31982","repos":[{"name":"bigb0x/CVE-2024-31982","url":"https://github.com/bigb0x/CVE-2024-31982","stars":10,"created":"2024-06-22"},{"name":"NanoWraith/CVE-2024-31982","url":"https://github.com/NanoWraith/CVE-2024-31982","stars":1,"created":"2024-06-22"},{"name":"th3gokul/CVE-2024-31982","url":"https://github.com/th3gokul/CVE-2024-31982","stars":0,"created":"2024-06-22"},{"name":"raishin1/CVE-2024-31982","url":"https://github.com/raishin1/CVE-2024-31982","stars":0,"created":"2025-11-11"}]},"nuclei":[{"id":"CVE-2024-31982","name":"XWiki < 4.10.20 - Remote code execution","severity":"critical","path":"http/cves/2024/CVE-2024-31982.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-31982.yaml"}],"first":{"date":"2024-06-22","source":"PoC-in-GitHub","url":"https://github.com/NanoWraith/CVE-2024-31982"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2024-04-10","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2024-31982","provenance":"source"},{"date":"2024-06-22","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/NanoWraith/CVE-2024-31982","provenance":"source"},{"date":"2025-03-25","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://isc.sans.edu/diary/XWiki+Search+Vulnerability+exploit+attempts+CVE20243721/31800/","provenance":"source"}],"speed":{"daysToPublicExploit":73,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":66.7,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 857 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.68,"detail":"percentile 0.9841"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"4 PoC-in-GitHub repos; 1 nuclei template"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":7.0,"detail":"base score 10"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-xwiki-platform-cve-2023-29207","children":[{"from":"CVE-2024-31982","to":"CVE-2025-24893","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-ui/src/main/resources/Main/DatabaseSearch.xml"],"commits":["https://github.com/xwiki/xwiki-platform/commit/3c9e4bb04286de94ad24854026a09fa967538e31","https://github.com/xwiki/xwiki-platform/commit/459e968be8740c8abc2a168196ce21e5ba93cfb8","https://github.com/xwiki/xwiki-platform/commit/67021db9b8ed26c2236a653269302a86bf01ef40"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2023-50721","published":"2023-12-15","fixed":"15.7-rc-1","kev":false,"link":{"from":"CVE-2023-50721","to":"CVE-2024-31982","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.xwiki.platform:xwiki-platform-search-ui","fromFixed":"14.10.15","toFixed":"14.10.20","daysApart":117},{"kind":"version-step","provenance":"source","package":"Maven:org.xwiki.platform:xwiki-platform-search-ui","fromFixed":"15.5.2","toFixed":"15.5.4","daysApart":117}]}},{"cve":"CVE-2024-31465","published":"2024-04-10","fixed":"15.10-rc-1","kev":false},{"cve":"CVE-2024-31982","published":"2024-04-10","fixed":"15.10-rc-1","kev":false},{"cve":"CVE-2024-37901","published":"2024-07-31","fixed":"15.10.2","kev":false,"link":{"from":"CVE-2024-31982","to":"CVE-2024-37901","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.xwiki.platform:xwiki-platform-search-ui","fromFixed":"14.10.20","toFixed":"14.10.21","daysApart":112},{"kind":"version-step","provenance":"source","package":"Maven:org.xwiki.platform:xwiki-platform-search-ui","fromFixed":"15.5.4","toFixed":"15.5.5","daysApart":112}]}}],"package":"Maven:org.xwiki.platform:xwiki-platform-search-ui"}}