$ curl http://your-website.com/public/../../../../proc/12345/environ
If your server is serving up your whole filesystem, you likely have a lot of big problems. $ curl http://your-website.com/public/../../../../proc/12345/environ
If your server is serving up your whole filesystem, you likely have a lot of big problems.Similar examples that involve passing paths as e.g. query strings? When you’ve written an application that takes a real file path as a parameter and haven’t done any of several things that can prevent that from pointing to files you don’t want it to.
http://example.com/viewPost.php?post=../../../whatever
(where the server side code has the bug, not the web server configuration itself)Famously IIS had some bugs like this. Not surprised that PHP has problems. What a clown car.
This is a file inclusion vulnerability. And that's something that is _very_ easily done in any language which people use to do stuff that loads files from the file system. Image resizers are a pretty common exploit path.
You'd be scared how often this works (Though not in the exact method you described). It might not even be a path traversal vulnerability [0] that lets you read files, it could be a shell injection [1] that allows you to `cat` the file.
[0] https://en.wikipedia.org/wiki/Directory_traversal_attack
[1] https://en.wikipedia.org/wiki/Code_injection#Shell_injection