Open
Description
Description
The path / /../ /../ /../ /../path/to/file
is considered invalid by some file check functions:
<?php
is_file("/ /../ /../ /../ /../path/to/file"); // -> false
realpath("/ /../ /../ /../ /../path/to/file"); // -> false
filesize("/ /../ /../ /../ /../path/to/file"); // -> false
However, the path can actually be used to open /path/to/file
:
<?php
echo file_get_contents("/ /../ /../ /../ /../path/to/file");
$res = fopen("/ /../ /../ /../ /../path/to/file", "r");
echo fread($res, 1024);
PHP Version
< 8.3
Operating System
No response