Tiki Wiki CMS Groupware <= 8.2 PHP Code Injection Vulnerability
The wiki plugin script failed to sanitise the 'regex' and 'regexres' parameters before passing them into a preg_replace() call, allowing injected PHP code to be executed. An attacker could combine this with a cross-site request forgery to run arbitrary PHP code on the server.
karmainsecurity.com
Published on karmainsecurity.com
Tiki Wiki CMS Groupware contains a flaw that allows a remote Cross-Site Request Forgery (CSRF / XSRF) attack which can lead to arbitrary PHP code execution. The flaw exists within the lib/wiki-plugins/wikipluginsnarf.php script, which not properly sanitize input passed via the ‘regex’ and ‘regexres’ parameters to the…
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 user-controlled 'regex' and 'regexres' parameters were passed into preg_replace() without sanitisation, allowing the pattern or replacement to inject PHP code.
Impact
An attacker could achieve arbitrary PHP code execution on the server, potentially via a CSRF attack against a logged-in user.
What the attacker needed
Tiki 8.2 or earlier; snarf plugin available; victim logged in (for CSRF)
The fix
The vendor released security patches for the affected branches, so it should be fixed by upgrading to a patched version.
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.
This software lets users add wiki plugins, small building blocks that do things like fetch a web page. One of those plugins took two settings from the user and used them directly in a pattern-matching function without cleaning them first. Because of that, someone could slip in their own PHP code (the language the server runs) and get it executed, and a trick page could make a logged-in user trigger it without realising.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.