Change the description of a video without publish_actions permission in Facebook
A user with only the basic public_profile permission could change the name and description of any of their own videos via an undocumented API endpoint. An attacker could modify video metadata without the required publish_actions permission.
Using the most basic permissions, publicprofile, it is possible to change the description/name
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.
What the report shows
The target is the Facebook Graph API, specifically the video object. The researcher found that a session holding only the most basic permission, public_profile, could change the description or name of any of that session user's videos. The Graph API reference for the video object lists the editable fields, and the report notes that this behaviour is undocumented: a permission requirement should apply to modifying the video object, but none was enforced.
The proof of concept is a single HTTP POST to the video endpoint, carrying the new name and the access token as form fields:
curl -F 'name=My Potato Video'
-F 'access_token=ACCESS_TOKEN'
https://graph.facebook.com/video_id
The result was that the video's name changed from "Hot Video" to "My Potato Video". The report does not describe any further steps, such as enumerating other fields or testing videos belonging to other users; it states the finding in terms of the session user's own videos.
Facebook escalated the report on the same day it was sent, and the issue was patched and a bounty awarded roughly three weeks later. After the fix, the endpoint asks for the publish_action permission. The report gives no severity rating or bounty amount.
Timeline as reported:
| Date and time | Event |
|---|---|
| Feb 25, 2015 6:59am | Report sent |
| Feb 25, 2015 6:24pm | Escalation by Facebook |
| Mar 20, 2015 10:47am | Patched and bounty awarded |
Root cause
The report does not state a root cause; it notes that a permission requirement should apply to modifying the video object. The endpoint accepted a POST that modified an object field, but the handler did not verify that the caller held a permission appropriate for that write. Authentication was present, since a valid access token was required, but authorisation was not: the token's scope was never checked against the operation being performed. The report calls the behaviour undocumented and says a permission requirement should apply to modifying the video object.
Impact
With only public_profile, an attacker holding a session could modify editable fields of that session user's videos, changing the name and description content that other users see. The report limits its claim to the session user's own videos and does not demonstrate cross-user modification, so the impact should be read that way: a permission-model bypass that lets a low-scope token perform a write the platform intended to gate behind a stronger permission. A session holding only public_profile could alter editable fields of that session user's own videos.
How this kind of bug works
This is a broken access control issue in the family often called IDOR or, more precisely here, a missing permission check on an object write. APIs separate authentication (who is calling) from authorisation (what the caller may do). A token identifies the caller and carries a set of scopes. Each endpoint is supposed to map the requested operation to a required scope and reject the request when the token lacks it. When a handler performs the write without consulting the scope, any valid token becomes sufficient.
The bug class is common where object handlers are generated or shared across many fields and operations. A framework may enforce permissions on some routes and not others, or a newer field may be added to an object without updating the permission table. Documentation describing a required permission is a strong signal of intent, and a mismatch between documented intent and observed behaviour is exactly what this report describes.
How to test for it
- Map the write surface. Take an object you can read, list its documented editable fields, and identify the endpoints and HTTP methods that modify them. Compare the documented permission for each write with the permission your token actually holds.
- Obtain a token with the weakest scope that still authenticates, ideally one that should not permit writes at all.
- Send a modification request for a field you own, using that low-scope token. A positive result is a successful response and a confirmed change when the documented requirement says the token should have been rejected.
- Repeat per field and per method, because permission checks are often attached to individual handlers rather than the whole object.
- Only after confirming the bypass on your own object, consider whether the same request can address another user's object identifier. Do not test against other users without programme authorisation.
A positive result looks like a successful write with a token that lacks the documented scope, verified by reading the object back. Common false positives: the token silently carries more scopes than you think (decode it and check), the field is genuinely public-writable by design, the write succeeded only because you are the owner and ownership is the intended control, or a cached read made the change appear to persist when it did not.
How it is fixed
The standard fix is to enforce the permission at the handler: before performing the write, resolve the required scope for that operation and reject the request when the token lacks it. The report says the endpoint now asks for publish_action. Beyond the single handler, the durable fix is to centralise the operation-to-permission mapping so new fields and routes inherit the check, and to add tests that assert a low-scope token is refused for every write on the object.
Hunting notes
Permission gaps cluster around newer or less-used fields, bulk and batch endpoints, and operations exposed through multiple API versions where an older version may lag behind the current permission model. Documentation is the best recon signal: any page stating that a permission is required for an operation is a claim worth testing against the live endpoint. Graph-style APIs, mobile back ends and internal endpoints reused by web clients are all fertile ground.
State the scope of the token explicitly so triage can reproduce it, and note the fix you would expect.
What happened, in plain words
Facebook has a feature that lets you upload videos and give each one a name and a description. Those details are what other people see when they look at your video, so they are meant to be under your control. Behind the website, the video is stored as an object in the Facebook Graph API, which is the programming interface that apps and tools use to read and change Facebook data.
Every request to that API has to carry an access token. Think of a token as a temporary key card: it proves which account is making the request, and it also lists what that account is allowed to do. Those listed abilities are called permissions. The most basic one is public_profile, which only lets an app see your public profile details. It is the permission you hand out when you log in to a simple app that just wants your name and picture.
The researcher found that a token holding only public_profile was enough to change the name and description of any of that user's videos. The Graph API documentation lists which fields of a video can be edited, and the report says a permission requirement should apply to changing a video, but none was enforced. In other words, the platform intended to ask for a stronger permission and simply did not.
The proof of concept
The demonstration is one HTTP POST request. A POST is the kind of request a browser sends when you submit a form, and it is used to send data that changes something on the server. The researcher used curl, a command-line tool for sending requests, with these arguments:
curl -F 'name=My Potato Video'
-F 'access_token=ACCESS_TOKEN'
https://graph.facebook.com/video_id
Line by line:
curl -F 'name=My Potato Video'tells curl to send a form field callednamewith the valueMy Potato Video. This is the new title the researcher wants the video to have.-F 'access_token=ACCESS_TOKEN'adds a second form field carrying the token.ACCESS_TOKENstands in for the real token value, which is a secret and is not shown here.https://graph.facebook.com/video_idis the address of the video object.video_idis a placeholder for the identifier of a specific video.
The result was that the video's name changed from "Hot Video" to "My Potato Video". That is the whole finding: a request made with a key card that should only open the front door was able to rewrite the label on a video.
The report does not describe any further steps, such as trying other fields or testing videos belonging to other users. It states the finding in terms of the session user's own videos.
What happened next
Facebook escalated the report on the same day it was sent, and the issue was patched and a bounty awarded about three weeks later. After the fix, the endpoint asks for the publish_action permission. The report gives no severity rating and no bounty amount.
| Date and time | Event |
|---|---|
| Feb 25, 2015 6:59am | Report sent |
| Feb 25, 2015 6:24pm | Escalation by Facebook |
| Mar 20, 2015 10:47am | Patched and bounty awarded |
Why it worked
The report does not state a cause; it says a permission requirement should apply to modifying a video. Two ideas are easy to mix up here. Authentication is about who is calling: the request had a valid token, so Facebook knew who it was. Authorisation is about what that caller may do: the code never checked whether the token's permissions covered this particular change. The token was accepted, but its list of allowed actions was never compared with the action being requested.
The report calls this an undocumented gap. The documentation implied a permission was needed, and the implementation did not enforce it. The impact is that a session holding only public_profile could change the name and description of that user's own videos.
In general, how this kind of bug works
This is a broken access control problem, often filed under the name IDOR, short for Insecure Direct Object Reference. The idea is simple: a system hands out references to things, such as a video identifier in a URL, and forgets to check whether the person using that reference is allowed to act on the thing it points to. A useful comparison is a hotel: your key card opens your room, and the door should refuse it for every other room. If the lock only checks that the card is a valid hotel card, any guest can open any door.
APIs are supposed to separate the two questions. A token says who you are and carries a set of scopes, which are the individual permissions bundled into it. Each endpoint should map the operation being requested to a required scope and reject the request when the token lacks it. When a handler performs the write without consulting the scope, any valid token becomes sufficient.
These gaps are common where many fields and operations share generated code. A framework may enforce permissions on some routes and not others, or a newer field may be added to an object without updating the permission table. Documentation that states a permission is required is a strong signal of intent, and a mismatch between documented intent and observed behaviour is exactly what this report describes.
How to test for it
- Map the write surface. Take an object you can read, list its documented editable fields, and identify the endpoints and HTTP methods that modify them. Compare the documented permission for each write with the permission your token actually holds.
- Obtain a token with the weakest scope that still authenticates, ideally one that should not permit writes at all.
- Send a modification request for a field you own, using that low-scope token. A positive result is a successful response and a confirmed change when the documented requirement says the token should have been rejected.
- Repeat per field and per method, because permission checks are often attached to individual handlers rather than the whole object.
- Only after confirming the bypass on your own object, consider whether the same request can address another user's object identifier. Do not test against other users without programme authorisation.
A positive result looks like a successful write with a token that lacks the documented scope, verified by reading the object back. Common false positives: the token silently carries more scopes than you think (decode it and check), the field is genuinely public-writable by design, the write succeeded only because you are the owner and ownership is the intended control, or a cached read made the change appear to persist when it did not.
How it is fixed
The standard fix is to enforce the permission at the handler: before performing the write, resolve the required scope for that operation and reject the request when the token lacks it. The report says the endpoint now asks for publish_action. Beyond the single handler, the durable fix is to centralise the operation-to-permission mapping so new fields and routes inherit the check, and to add tests that assert a low-scope token is refused for every write on the object.
Where to look
Permission gaps cluster around newer or less-used fields, bulk and batch endpoints, and operations exposed through multiple API versions where an older version may lag behind the current permission model. Documentation is the best starting point: any page stating that a permission is required for an operation is a claim worth testing against the live endpoint. Graph-style APIs, mobile back ends and internal endpoints reused by web clients are all fertile ground.
State the scope of the token explicitly so triage can reproduce it, and note the fix you would expect.
Glossary
- Graph API: Facebook's programming interface for reading and changing data such as profiles, videos and posts.
- Object: a single item stored in an API, here one video, with fields such as its name and description.
- Endpoint: the address a request is sent to, which performs a particular operation.
- HTTP POST: a request type used to send data that changes something on a server, like submitting a form.
- Request: a message a client sends to a server asking it to do something.
- Access token: a secret string that identifies the caller and lists what it is allowed to do.
- Permission: an individual ability granted to an app or token, such as reading a public profile.
- Scope: the set of permissions a token carries.
public_profile: the most basic Facebook permission, allowing access to public profile details.publish_action: the permission the endpoint required after the fix.- Authentication: proving who the caller is.
- Authorisation: deciding what an identified caller is allowed to do.
- Broken access control: a flaw where the system fails to check whether the caller may perform an action.
- IDOR (Insecure Direct Object Reference): a flaw where a reference to an object, such as an identifier, is used without checking the caller's right to act on that object.
- curl: a command-line tool for sending HTTP requests.
- Form field: a named value sent with a request, as when a web form is submitted.
- Proof of concept: a minimal demonstration that a flaw is real.
- Escalation: passing a report to a more specialised team for deeper review.
- Patch: a change to the software that closes the flaw.
- Bounty: a reward paid for a valid security report.
- False positive: a result that looks like a flaw but is not one.