As you can see, a user-controlled variable theme is being used in an include call. this could be used for Remote Code Execution in older PHP versions where attacker can specify %00 (nullbytes) to make php ignore the following part (/admin/admin.inc.php)
Thanks
In Piwigo/admin/theme.php:
```
44: $filename = PHPWG_THEMES_PATH . $_GET['theme'] . '/admin/admin.inc.php';
47: include_once ($filename);
```
As you can see, a user-controlled variable theme is being used in an include call. this could be used for Remote Code Execution in older PHP versions where attacker can specify %00 (nullbytes) to make php ignore the following part (/admin/admin.inc.php)
Thanks
<!-- github-sync-id:196307673 -->
$_GET['theme'] must be in the $themes->fs_themes list, which is dynamically created:
$dir = opendir(PHPWG_THEMES_PATH);
while ($file = readdir($dir))
{
if ($file!='.' and $file!='..')
{
$path = PHPWG_THEMES_PATH.$file;
if (is_dir($path)
and preg_match('/^[a-zA-Z0-9-_]+$/', $file)
and file_exists($path.'/themeconf.inc.php')
)
{
So I don't think it's possible to trick it easily :-)
$_GET['theme'] must be in the $themes->fs_themes list, which is dynamically created:
```
$dir = opendir(PHPWG_THEMES_PATH);
while ($file = readdir($dir))
{
if ($file!='.' and $file!='..')
{
$path = PHPWG_THEMES_PATH.$file;
if (is_dir($path)
and preg_match('/^[a-zA-Z0-9-_]+$/', $file)
and file_exists($path.'/themeconf.inc.php')
)
{
```
So I don't think it's possible to trick it easily :-)
<!-- github-comment-id:267943505 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In Piwigo/admin/theme.php:
As you can see, a user-controlled variable theme is being used in an include call. this could be used for Remote Code Execution in older PHP versions where attacker can specify %00 (nullbytes) to make php ignore the following part (/admin/admin.inc.php)
Thanks
$_GET['theme'] must be in the $themes->fs_themes list, which is dynamically created:
So I don't think it's possible to trick it easily :-)
I think I maybe wrong about this one. I didn't see that part.