Authentication
The report describes two authenticated PHP object injection (phar deserialisation) flaws in Horde Groupware Webmail: a bookmark URL passed to a crawl task that is later fetched with a file wrapper, and a sort preference that is unserialised in a class constructor. A low-privileged user could chain these with a planted phar archive to execute code as the web server user.
srcincite.io
Published on srcincite.io
Some time ago I performed an audit of the Horde Groupware Webmail suite of applications and found an interesting code pattern that facilitated the attack of 34+ remote code execution vulnerabilities. Additionally, Andrea Cardaci’s performed an audit around the same time and we seemed to miss each others bugs due to a…
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 application passes user-controlled values into PHP file functions (fopen and unserialize) without restricting the scheme or content, so a phar:// path or serialised string is processed as trusted data.
Impact
An authenticated low-privileged user could execute code as the www-data user, but the first bug only works on non-default setups where the curl extension is absent and the fopen request class is used.
What the attacker needed
A low-privileged account; plant a phar archive via another flaw; non-default setup without php-curl
How it was found
- Log in and plant a phar archive in the temp folder using the separate upload flaw
- Add a bookmark whose URL points at the planted archive using the phar wrapper
- Load the bookmark list to read the bookmark identifier from the redirect link
- Request the redirect script with that identifier to trigger the deserialisation
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.
Some PHP code can turn a saved string back into a live object, and if an attacker controls that string they may be able to make the server run their code. Here a logged-in user could store a specially crafted file and then make the application read it through a URL-like path, which triggers that object creation. The report also explains why one of the two bugs only works on non-default setups.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.