Today I found out that the URL of Instagram private accounts' images and the URL of files I sent to my cousin in Discord are accessable even if I am not logged in or even on my phone using a VPN. For example the following link is an image that my cousin sent me on Discord:


or an image that I sent as a message on Instagram:


How is this considered secure? What are the odds of a random URL points to nothing instead of a file?

  • I find that many platforms are somewhat weak when it comes to direct linking. I guess the reasoning is that you wouldn't have that link if you weren't a logged-in user yourself, and distributing it is no different than giving away your password, which they can't prevent either. "Carbon unit error." On the other hand, vague sharing of access is very common (maybe I don't want everyone on the server to have a permalink, especially if I can't manually delete the file later). It's just security through obscurity. Commented May 9, 2023 at 19:23
  • @LukeSawczak ah, of course - it's been a long day
    – schroeder
    Commented May 9, 2023 at 19:24
  • @LukeSawczak but it is almost impossible to get anything from a random password. But what are the odds of getting a file by a random UUID if the server let you search for a file without any restriction?
    – Dante
    Commented May 9, 2023 at 20:03
  • Ok, these links work, but how were you expecting these to be secured? You have purposely shared them. How is the recipient supposed to access them without them being accessible? These aren't instances of links to images that you have not shared.
    – schroeder
    Commented May 9, 2023 at 20:16
  • 1
    We have quite a few Q&As on that topic: security.stackexchange.com/questions/58215/…
    – schroeder
    Commented May 9, 2023 at 20:32

1 Answer 1


If the URL contains a sufficiently long, randomly generated number (like a UUID version 4), then trying to guess it through brute-force is absolutely hopeless, no matter how many files have been uploaded. For example, a UUID v4 contains 122 random bits and therefore has 2^122 possible variations. In decimal representation, that number has 37 digits.

Of course this doesn't help if the URL is accidentally or purposely leaked. Then anybody who knows the URL can access the file until the provider either deletes the file or “disables” the URL. For more serious cases, there are plenty of file sharing services which do implement authentication (e. g. through a password).

Not the answer you're looking for? Browse other questions tagged .