Externalizable
Member
- Affected version
- XenForo 2.2.9
Hey,
It has come to our attention that deleted users will have their threads posted to private forums revealed to the public.
This behavior does not seem intended. Naturally, deleted members should have their posts protected, even after account deletion.
Steps to reproduce:
It should be noted that, in order to exploit this bug, e.g. to collect potential privately shared information posted to this private forum, the attacker must know the thread id.
However, given that thread ids are incremental, this is easily accomplished with a simple crawling script.
We have temporarily fixed this issue by extending XFCP_Thread preDispatchType:
This code throws a "No permission" exception if a guest visitor is trying to view a thread created by user_id 0, which the deleted user will be at the time of page load, fixing this bug. We do not utilize the "Enable writing before registering" feature which I believe breaks with this hotfix.
Tested using a fresh vanilla XenForo installation.
Please let me know if I can provide any more details. Thanks!
Forum permissions:
Thread as seen by an Administrator:
Thread as seen by a guest in incognito mode:
It has come to our attention that deleted users will have their threads posted to private forums revealed to the public.
This behavior does not seem intended. Naturally, deleted members should have their posts protected, even after account deletion.
Steps to reproduce:
- Create a private forum with the "View threads by others" permission set to "No" for all user groups
- A user creates a new thread in the aforementioned private forum
- This new thread can not be viewed by other registered users or guests
- The user is deleted
- The new thread is now visible to guests, but not to other registered users
It should be noted that, in order to exploit this bug, e.g. to collect potential privately shared information posted to this private forum, the attacker must know the thread id.
However, given that thread ids are incremental, this is easily accomplished with a simple crawling script.
We have temporarily fixed this issue by extending XFCP_Thread preDispatchType:
PHP:
protected function preDispatchType($action, ParameterBag $params)
{
/** @var \XF\Entity\Thread $thread */
$thread = \XF::finder('XF:Thread')->where('thread_id', $params['thread_id'])->fetchOne();
if ($thread) {
if (!$thread->user_id && !\XF::visitor()->user_id) {
throw $this->exception(
$this->plugin('XF:Error')->noPermission()
);
}
}
parent::preDispatchType($action, $params);
}
Tested using a fresh vanilla XenForo installation.
Please let me know if I can provide any more details. Thanks!
Forum permissions:
Thread as seen by an Administrator:
Thread as seen by a guest in incognito mode: