Cve 2024 31982 When A Simple Wiki Search Turns Into A Rce Party
XWiki's database search feature allowed an attacker to execute arbitrary commands by manipulating the search text. Anyone with access to the search functionality could run commands with the XWiki service's privileges.
Published on infosecwriteups.com
In the vast ocean of web platforms, XWiki has been a beloved and versatile tool for building knowledge bases, wikis, and collaborative websites. It’s flexible, open-source, and, well… now vulnerable!
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the database search feature passed user-supplied search text into a context where it was interpreted and executed as code instead of being treated as plain data.
Impact
An attacker with access to the search functionality could execute arbitrary commands with the XWiki service's privileges, potentially taking control of the web server.
What the attacker needed
Access to the search functionality; vulnerable XWiki version
The fix
It was fixed by updating to XWiki 14.10.20, 15.5.4, or 15.10RC1, or by patching or deleting the Main.DatabaseSearch page.
How it was found
- Craft a specially designed search string containing code.
- Submit it through the search functionality so the server interprets and executes it.
- Run commands with the same privileges as the XWiki service.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
XWiki is software for building wikis. A flaw in its search box let someone type special text that the server would run as a command, like giving a stranger the keys to the machine. The fix is to update XWiki to a patched version.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.