stable-diffusion-webui-images-browser icon indicating copy to clipboard operation
stable-diffusion-webui-images-browser copied to clipboard

Path traversal exploit allowing you to see any image on a PC and moving ANY FILE on a pc somewhere else

Open lina-x64 opened this issue 2 years ago • 0 comments

I was testing around and boi, this is not good.

You can basically get all images from any directory by using the "Others" directory. Simply using normal path traversal will not work image That is taken care of, but I first found out that you could send an own fetch-request with a page index. Later I found out this can be done simply by clicking on the "First page" button, as it'd take the input in the text field.

So, first, load a normal dir, like "." image

Edit the text input to stuff like "../../../../../../projects/.random/example_folder", and hit "First page" image

The folder will in fact load! image This means you can read any images onanother pc!

Now, I can do one better: image The "Move to favorites" button moves the Image out of the current folder to your favorite image folder. Now, here, there is no check if it is actually an image! Simply modify the request: Here, I will move a valuable file called dont_move_me.txt image This allows you moving any file away, basically allowing to delete any file you want.

Please fix immediately.

lina-x64 avatar Dec 08 '22 17:12 lina-x64