Recently, security researchers at Checkpoint discovered a vulnerability that would have allowed attackers to change messages and links sent through Facebook Messenger. Facebook quickly patched the bug … but did you know links sent privately through Messenger can be read by anyone? Moreover, Facebook knows about this and has no plans to fix the issue.


Recently, security researchers at Checkpoint discovered a vulnerability that would have allowed attackers to change messages and links sent through Facebook $META Messenger. Facebook quickly patched the bug … but did you know links sent privately through Messenger can be read by anyone? Moreover, Facebook knows about this and has no plans to fix the issue.
The first time a specific link is shared on Facebook, Facebook’s crawler takes a look at the shared page, extracts the title, the description, and the thumbnail image, assigns an unique identifier, and then stores this information. The next time Facebook
Join 500,000+ readers who start their day with Quartz.
By subscribing, you agree to our Terms of Service and Privacy Policy.

All objects stored on Facebook, whether it’s a picture, a status, or a link, are given a unique, non-chronological identification number. Mark Zuckerberg is object number four:

A developer can request an object by its number through the Facebook API, an interface for developers to connect with Facebook, which will return the corresponding information only if you have permission to access it. This means that you can’t simply access someone else’s private status update without obtaining their permission. Seems logical, right?
I started playing around with this feature. Most of the time, I got an error message that the object either did not exist or that I did not have permission to view it:

As I was about to give up, a URL popped up. Cool, but this left me none the wiser: you can’t do much with a timestamp and a string that says: “website.”

Then I appended “url” to my initial request, asking Facebook if it would be so nice as to display the link address as well. To my surprise, this worked:

At this point, I wondered if I could also use this to view links users privately shared, so I asked my friend Bas to help me out, create a Google $GOOGL Doc and privately share the link. Here’s what I received:

Then I asked Bas to use Facebook Messenger to send the link to himself and click on it:

Since the link was saved to Facebook’s database when Bas opened the link via Messenger, I asked him to use Facebook debugger tool to get the object identification number and provide it to me:

The tool also showed the number identifier attached to the post:

Back to my account. When I tried to access the object attached to the number above, the URL popped up:

Moments later, I was able to access the confidential Google Document:

I tried to reproduce this a couple of times until I decided to find out whether it was also possible to get other people’s (private) links exploiting this. I wrote a quick script that would take any identification number and increment it gradually to discover other links. It worked:
While the results did not include an ID for the user who shared the link, I was able to identify some because their user ID, the number corresponding to their account, was included in the link.
While you may only share links to funny cat videos with your friends, you should still be worried about this exploit. Sometimes, sensitive information (personal data, secret keys, …) are included in links without you even noticing. Just take a look at the redacted and quite innocent looking links from earlier:

In this small set of extracted URL’s, I’ve already found some interesting info:
..and these aren’t mutually exclusive; some URLs include multiple parameter types listed above in one single link, thereby allowing a total stranger to gain personal information about you. Hello NSA?
I reported this issue to Facebook under their responsible disclosure program, which I’ve had successful experiences with before. Here’s their official response:

Friendly and descriptive as always (I love participating in Facebook’s bounty program), they told me this would be deemed a won’t-fix, and is actually intentional behavior. I was puzzled: How can Facebook let this happen? Whilst it’s not possible to get links for a specific user, you could easily run through results all day* until you find something interesting.
> 29th of May: Me: Reported through Facebook’s whitehat tool.
*Yes, Facebook does block excessive requests but there are ways to bypass that, e.g., using multiple access tokens and if needed, VPNs. Rate limiting won’t stop someone who is determined.
Are the links we send being tracked this way? I have absolutely no idea, but now at least we know they could be.
FAQ
This post originally appeared at Medium.