Skip to content
Access control Write-up Intermediate

Session Expiration Bypass in Facebook Creator App

The Facebook Creator app did not properly enforce session expiration after a user logged out all devices; an attacker with access to a logged-in device could continue to perform actions such as posting or deleting content even after the session was supposedly terminated.

Philippe Harewood Follow

Published on medium.com

Bounty$1,500 View original

#### Ajay Gautam

Ajay Gautam, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

Facebook Creator Studio is the product at the centre of this write-up. In the author's words: "Facebook Creator Studio lets creators and publishers manage posts, insights and messages from all of your Facebook Pages in one place." The author was able to publish a post, delete a post and carry out the other actions available in the Creator app.

Image for post
Image for post From the original on medium.com
Image for post
Image for post
Image for post
Image for post

The security issue was that these actions could still be carried out after the session had supposedly expired. The author was able to publish a post, delete a post, or perform the other actions available in the Creator app even after the session had expired.

Setup

The researcher used two devices: a phone and a laptop. Both were logged into the same Facebook account, and the Creator app was in use on the phone.

Finding it

The trigger is the "log out of all sessions" control under Security and Login. When the author used it to log out all logged-in devices, the Creator app on the phone displayed a session expired message. The message was shown, but the session was not actually expired inside the app. That mismatch between the UI state and the real session state is what made the behaviour worth investigating.

Session Expired
Session Expired From the original on medium.com

The question the author then asked was how a post, a delete or a message could still go through after that message appeared.

Exploitation

Step 1: log in on both devices

The author logged into the Facebook account on both the phone and the laptop.

Step 2: log out all active sessions from the laptop

From the laptop, all active sessions of the Facebook Creator app were logged out through Security and Login.

Step 3: observe the expired message on the phone

The phone showed the session expired message. This is the state the app presents to the user after the remote logout.

Step 4: take the phone offline

Mobile data and Wi-Fi were turned off on the phone.

Step 5: restart the app

All running apps were closed and the Facebook Creator app was reopened, still offline.

Step 6: compose a post offline

With no connectivity, the author tried to create a post. The app allowed the post to be composed in this state.

Step 7: publish while reconnecting

While clicking Publish post, the author turned the Wi-Fi back on. The post was successfully created.

Step 8: the expired message returns

After the post was successfully created, the session expired message was shown again.

Image for post
Bounty Awarded From Facebook From the original on medium.com

The same procedure would have worked for deleting posts and for the other actions available in the Creator app, according to the author.

Root cause

The report does not describe the server-side or client-side code involved, so the mechanism can only be inferred. What the sequence shows is that the app's session expiry was enforced as a client-side state: the expired message was displayed, but the request that published the post was still accepted when connectivity returned. The report does not describe the mechanism, so the root cause cannot be determined from it.

Impact

As the author puts it, once he had logged into someone's Facebook account, he could have used that account for a lifetime even after the victim logged out all devices or changed the password. The actions demonstrated were publishing a post, with deleting posts and sending messages described as equally reachable by the same procedure.

Fix

It states that the app has since been removed from Facebook. The timeline given is:

Event Date
Reported Aug 1, 2018
Triaged Aug 30, 2018
Patched Feb 28, 2019
Bounty awarded Apr 10, 2019

The bounty was 1500 USD.

Variants to test

  1. Repeat the offline-compose, online-publish sequence against other mobile admin apps that show a session expired state. A positive result is a post, delete or message that succeeds after the expired message has been displayed.
  2. Try the sequence with other state-changing actions in the same app, such as deleting a post or sending a message. A positive result is any of them completing after the expired message.
  3. A positive result is a queued request that the server accepts after the session was invalidated.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

Imagine you have a key to a friend's house. Your friend decides to change the locks and tells you the old key no longer works. You walk up to the door, put the old key in, and the door opens anyway. That is roughly the shape of the bug described here: an app told the user their session had ended, but the app could still do things on the account afterwards.

The product involved is Facebook Creator Studio. In the author's words: "Facebook Creator Studio lets creators and publishers manage posts, insights and messages from all of your Facebook Pages in one place." A Page is a public profile on Facebook for a business, brand or public figure, and Creator Studio is the tool for running those Pages. The author was able to publish a post, delete a post and carry out the other actions available in the Creator app.

Image for post
Image for post From the original on medium.com
Image for post
Image for post
Image for post
Image for post

The security issue was that these actions could still be carried out after the session had supposedly expired. The author was able to publish a post, delete a post, or perform the other actions available in the Creator app even after the session had expired.

A few words before we go further, because they come up constantly.

A session is the period during which a website or app remembers that you are logged in. When you type your password, the server does not ask for it again on every click. Instead it gives your device a small piece of data, often called a cookie or a token, and your device sends it back with each request. Think of it as a wristband at an event: you show your ticket once at the door, get the wristband, and after that the staff just glance at your wrist. Logging out is meant to be the moment the wristband is cut off.

An API (application programming interface) is the set of addresses and rules an app uses to talk to a server behind the scenes. When you tap Publish, the app does not send a picture of your screen; it sends a structured request to one of those addresses, and the server replies with a result. Think of a restaurant: the menu and the waiter are the API, the kitchen is the server, and you never walk into the kitchen yourself.

Session expiry is the moment the server decides a session is no longer valid, for example because the user logged out everywhere or too much time passed. After expiry, requests carrying the old wristband should be refused.

A session expiration bypass is when something gets past that refusal: the app or server still honours an action that should have been blocked once the session ended. That is the class of bug in this write-up.

Setup

The researcher used two devices: a phone and a laptop. Both were logged into the same Facebook account, and the Creator app was in use on the phone.

Why two devices? Because the bug is about one device being told to log out by another. The laptop plays the role of the account owner pressing the big red button, and the phone plays the role of the device that is supposed to obey. With a single device you cannot easily separate "the action I am taking" from "the session being killed elsewhere".

Finding it

The trigger is the "log out of all sessions" control under Security and Login. This is a real Facebook settings page where you can see every device currently logged into your account and end all of those sessions at once. It exists precisely for the situation where you think someone else has your password: you change it and kick everyone out.

When the author used it to log out all logged-in devices, the Creator app on the phone displayed a session expired message. The message was shown, but the session was not actually expired inside the app. That mismatch between what the screen said and what the app could still do is what made the behaviour worth investigating.

Session Expired
Session Expired From the original on medium.com

The image shows the session expired message as it appeared in the app.

Think about what that message is supposed to mean. It is the app telling you: your wristband has been cut, you can no longer get in. If the app can still publish a post after showing that, the message is decoration rather than a security control. The question the author then asked was how a post, a delete or a message could still go through after that message appeared.

Exploitation

The technique is simple enough to follow without any tools beyond the app itself. Each step has a reason.

Step 1: log in on both devices

The author logged into the Facebook account on both the phone and the laptop. This gives you one session on each device, so you can later end them from one place and watch what the other does.

Step 2: log out all active sessions from the laptop

From the laptop, all active sessions of the Facebook Creator app were logged out through Security and Login. This is the account owner's legitimate action. On a correct implementation, every other device should now be unable to do anything until it logs in again.

Step 3: observe the expired message on the phone

The phone showed the session expired message. This is the state the app presents to the user after the remote logout. So far the app looks like it is behaving.

Step 4: take the phone offline

Mobile data and Wi-Fi were turned off on the phone. This is the interesting move. With no connection, the app cannot ask the server "am I still allowed?" and cannot receive a refusal. Whatever the app does next happens on the device alone, using whatever it already has stored.

Step 5: restart the app

All running apps were closed and the Facebook Creator app was reopened, still offline. Restarting forces the app to start from scratch rather than from a screen it was already sitting on. It has to decide, with no network, what state it is in and what it will let the user do.

Step 6: compose a post offline

With no connectivity, the author tried to create a post. The app allowed the post to be composed in this state. Composing is just filling in the text and pressing towards publish; the app held the action ready without being able to confirm anything with the server.

Step 7: publish while reconnecting

While clicking Publish post, the author turned the Wi-Fi back on. The post was successfully created. The timing matters: the connection came back at the moment the action was sent, so the request left the phone carrying whatever credentials the app still had, and the server accepted it.

Step 8: the expired message returns

After the post was successfully created, the session expired message was shown again. The app goes back to claiming the session is over, having just done something that should have been impossible in that state.

Image for post
Bounty Awarded From Facebook From the original on medium.com

The image shows the bounty award notification from Facebook.

The same procedure would have worked for deleting posts and for the other actions available in the Creator app, according to the author.

Root cause

The report does not describe the server-side or client-side code involved, so the mechanism can only be inferred. What the sequence shows is that the app's session expiry was enforced as a client-side state: the expired message was displayed, but the request that published the post was still accepted when connectivity returned. The report does not describe the mechanism, so the root cause cannot be determined from it.

In plain terms: a check that only exists on the phone is a suggestion, not a lock. The phone can be put in a state where it skips the suggestion, and if the server does not check for itself, the action goes through. The everyday comparison is a bouncer who only reads the guest list on a clipboard that the guest is holding.

Impact

As the author puts it, once he had logged into someone's Facebook account, he could have used that account for a lifetime even after the victim logged out all devices or changed the password. The actions demonstrated were publishing a post, with deleting posts and sending messages described as equally reachable by the same procedure.

That last point is worth pausing on. This is not a way to break into an account from nothing. It is a way to keep using an account you are already inside, after the owner has done the thing that is supposed to remove you. For a Page admin, that means an intruder could keep posting or deleting content after being kicked out.

Fix

It states that the app has since been removed from Facebook. The timeline given is:

Event Date
Reported Aug 1, 2018
Triaged Aug 30, 2018
Patched Feb 28, 2019
Bounty awarded Apr 10, 2019

The bounty was 1500 USD. "Triaged" means the security team looked at the report, confirmed it was a real issue and started tracking it. A bounty is the payment a company makes for a valid report under its bug bounty programme, which is a scheme where outside researchers are invited to report flaws in exchange for a reward.

Variants to test

If you want to look for the same shape of bug elsewhere, these are the directions the author's technique suggests. Each one keeps the same idea: put the client in a state where it cannot check, then let it act.

  1. Repeat the offline-compose, online-publish sequence against other mobile admin apps that show a session expired state. A positive result is a post, delete or message that succeeds after the expired message has been displayed.
  2. Try the sequence with other state-changing actions in the same app, such as deleting a post or sending a message. A positive result is any of them completing after the expired message.
  3. A positive result is a queued request that the server accepts after the session was invalidated.

Glossary

  • API: the set of addresses and rules an app uses to talk to a server behind the scenes, like a menu and waiter between you and the kitchen.
  • Bug bounty programme: a scheme where a company invites outside researchers to report security flaws and pays for valid ones.
  • Bounty: the payment made for a valid report under such a programme.
  • Client: the app or browser on your device, as opposed to the server.
  • Client-side check: a check performed by the app on your device, which the device's owner can potentially influence or skip.
  • Cookie: a small piece of data a site stores on your device and your device sends back with requests, often used to remember that you are logged in.
  • Creator Studio: Facebook's tool for managing posts, insights and messages across Facebook Pages from one place.
  • Facebook Page: a public profile on Facebook for a business, brand or public figure.
  • Impact: the real-world harm a flaw could cause if someone abused it.
  • Offline: with no network connection, so the device cannot reach the server.
  • Page admin: a person with permission to manage a Facebook Page.
  • Patch: a fix applied to software.
  • Precondition: something that must already be true for an attack to work.
  • Publish: the action of making a composed post live on the account or Page.
  • Request: a message an app sends to a server asking it to do something or return something.
  • Root cause: the underlying reason a flaw exists, as opposed to its visible symptom.
  • Security and Login: the Facebook settings area where you can see logged-in devices and end their sessions.
  • Server: the remote computer that stores data and decides whether requests are allowed.
  • Server-side check: a check performed by the server, which the user's device cannot skip.
  • Session: the period during which a site or app remembers that you are logged in, carried by a cookie or token.
  • Session expiration: the moment a session stops being valid, for example after a logout everywhere or a timeout.
  • Session expiration bypass: getting an action accepted after the session should have ended.
  • Session expired message: the notice an app shows when it believes the session has ended.
  • State-changing action: anything that alters data, such as publishing, deleting or sending a message, as opposed to just viewing.
  • Token: a piece of data, similar in role to a cookie, that proves to the server which session a request belongs to.
  • Triaged: reviewed and confirmed as a real issue by the security team, and moved into their tracking process.
  • UI: the user interface, the screens and controls you see and tap.
  • Wristband comparison: the everyday image used here for a session: shown once at the door, then trusted on sight until it is cut off.

More by Philippe Harewood

View all

56 more disclosed reports, best first.

More from Meta

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.