CVE-2024-31982

CVE-2024-31982 is a critical-severity code injection vulnerability in org.xwiki.platform:xwiki-platform-search-ui (maven), affecting versions >= 2.4-milestone-1, < 14.10.20. It is fixed in 14.10.20, 15.5.4, 15.10-rc-1.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

XWiki Platform: Remote code execution as guest via DatabaseSearch

Workarounds

It is possible to manually apply this 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.

References

Impact

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.

To reproduce on an instance, without being logged in, go to <hostname>/xwiki/bin/get/Main/DatabaseSearch?outputSyntax=plain&text=%7D%7D%7D%7B%7Basync%20async%3Dfalse%7D%7D%7B%7Bgroovy%7D%7Dprintln%28%22Hello%20from%22%20%2B%20%22%20search%20text%3A%22%20%2B%20%2823%20%2B%2019%29%29%7B%7B%2Fgroovy%7D%7D%7B%7B%2Fasync%7D%7D%20. If the title of the RSS channel contains Hello from search text:42, the instance is vulnerable.

Untrusted input is evaluated as executable code within the application's runtime environment. Typical impact: arbitrary code execution within the application's privilege context.

CVE-2024-31982 has a CVSS score of 10.0 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (14.10.20, 15.5.4, 15.10-rc-1); upgrading removes the vulnerable code path.

Affected versions

org.xwiki.platform:xwiki-platform-search-ui (>= 2.4-milestone-1, < 14.10.20) org.xwiki.platform:xwiki-platform-search-ui (>= 15.0-rc-1, < 15.5.4) org.xwiki.platform:xwiki-platform-search-ui (>= 15.6-rc-1, < 15.10-rc-1)

Security releases

org.xwiki.platform:xwiki-platform-search-ui → 14.10.20 (maven) org.xwiki.platform:xwiki-platform-search-ui → 15.5.4 (maven) org.xwiki.platform:xwiki-platform-search-ui → 15.10-rc-1 (maven)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

This vulnerability has been patched in XWiki 14.10.20, 15.5.4 and 15.10RC1.

Frequently Asked Questions

  1. What is CVE-2024-31982? CVE-2024-31982 is a critical-severity code injection vulnerability in org.xwiki.platform:xwiki-platform-search-ui (maven), affecting versions >= 2.4-milestone-1, < 14.10.20. It is fixed in 14.10.20, 15.5.4, 15.10-rc-1. Untrusted input is evaluated as executable code within the application's runtime environment.
  2. How severe is CVE-2024-31982? CVE-2024-31982 has a CVSS score of 10.0 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of org.xwiki.platform:xwiki-platform-search-ui are affected by CVE-2024-31982? org.xwiki.platform:xwiki-platform-search-ui (maven) versions >= 2.4-milestone-1, < 14.10.20 is affected.
  4. Is there a fix for CVE-2024-31982? Yes. CVE-2024-31982 is fixed in 14.10.20, 15.5.4, 15.10-rc-1. Upgrade to this version or later.
  5. Is CVE-2024-31982 exploitable, and should I be worried? Whether CVE-2024-31982 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2024-31982 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2024-31982?
    • Upgrade org.xwiki.platform:xwiki-platform-search-ui to 14.10.20 or later
    • Upgrade org.xwiki.platform:xwiki-platform-search-ui to 15.5.4 or later
    • Upgrade org.xwiki.platform:xwiki-platform-search-ui to 15.10-rc-1 or later

Other vulnerabilities in org.xwiki.platform:xwiki-platform-search-ui

Stop the waste.
Protect your environment with Kodem.