Skip to content
Access control Write-up Intermediate

Change-The-Background-Of-3d-Posts-For-Any-Facebook-User

A 3D post created through the API had no background set, and a separate endpoint that sets the background did not check who owned the post. An attacker who knew a target asset identifier could therefore change the background of another user's 3D post, and the original author could not change it back.

Philippe Harewood Follow

Published on philippeharewood.com

There is an issue with Facebook 3D Posts such that if a person uploads the 3D object via the API the background wouldn’t be set yet. This means anyone will be able to set the background of that post.

Philippe, on philippeharewood.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.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target is Facebook's 3D Posts feature. According to the report, when a person uploads a 3D object through the API, the background of the resulting post is not set at upload time. Instead, the background is applied in a separate call. The researcher found that anyone could set the background of that post, because the background is set in a separate call.

The proof of concept is a single request:

HTTP
HTTP POST
/3d/render_settings/create/
Host: facebook.com
asset3d_id=TARGET_ASSET_ID
background=BACKGROUND_TYPE

Step by step, as the report describes it:

  1. A victim uploads a 3D object via the API. The post exists, but its background has not yet been set.
  2. The attacker sends the request above, supplying the victim's asset identifier as asset3d_id and a background type of their choosing.
  3. The background of the victim's 3D post is changed.

The report adds that the original author will not be able to change the background.

The timeline given is:

Date Event
Feb 21, 2018 Report sent
Feb 21, 2018 Further investigation by Facebook
Mar 28, 2018 Fixed by Facebook
Mar 28, 2018 Bounty awarded by Facebook

The report does not give a severity rating, a CVSS score or a bounty amount.

Root cause

The report points to a split between two operations: creating the 3D post and setting its render settings. The background is written by a separate endpoint, /3d/render_settings/create/, which takes the asset identifier from the request.

Impact

As the report puts it, this could have allowed an attacker to modify the background of another user's 3D post. The report does not describe any further consequence, such as content injection, script execution or access to other data.

How this kind of bug works

This is a broken object-level authorisation problem, sometimes called IDOR, in a two-step write flow. Many features are created in stages: an object is uploaded or created first, and attributes are attached afterwards by separate endpoints. Each of those endpoints receives an identifier for the parent object. If the endpoint trusts that identifier and performs the write without confirming that the session's user owns the object, any authenticated user who can guess or obtain an identifier can write to someone else's object.

The pattern is common where the second step was built as a convenience API, where identifiers are sequential or otherwise enumerable, or where the ownership check lives in the UI rather than the server. Defences are straightforward in principle: every endpoint that acts on an object must resolve the object from the identifier and compare its owner against the authenticated principal before writing, and must return a generic error when the check fails so that the response does not reveal whether the object exists.

How to test for it

  1. Identify features that are created in more than one request. Look for a create call followed by calls that set attributes, upload media, or apply settings, and note the identifiers passed between them.
  2. Create two accounts and one object of the relevant type under each. Record the identifiers from your own objects.
  3. With account A's session, replay the attribute-setting request but substitute account B's object identifier. Keep every other field as the application sent it.
  4. Confirm the write by fetching the object as account B, or as an unauthenticated viewer, and checking that the attribute changed. A positive result is a state change visible to the owner, not merely a 200 response.
  5. Repeat with no session, with an expired session, and with a session belonging to an unrelated account, to see which checks exist.

Common false positives: the endpoint returns success but silently ignores the write; the change is only reflected in the attacker's own view because of client-side caching; the object is genuinely shared or public and the write is intended; or the identifier belongs to a copy the application made for you. Always verify from the victim's side.

How it is fixed

The report states only that Facebook fixed the issue on Mar 28, 2018. Where a multi-step flow exists, the parent object should be marked as incomplete until the flow finishes, and the follow-up endpoints should only accept objects in that state and only from their owner. Identifiers that are hard to guess, such as random values, raise the cost of finding a target but do not replace the check. Logging and alerting on cross-account write attempts helps catch regressions.

Hunting notes

These bugs tend to hide in newer or less-exercised features: media pipelines, render or export settings, draft and staging flows, and anything with a two-phase create. Recon signals include endpoints whose names contain verbs such as create, update or settings and which take an object identifier as a parameter, and JavaScript that reveals a separate call after an upload. Sequential or short identifiers in your own objects are a hint that enumeration is cheap.

To get a report accepted, demonstrate a concrete state change on an object you control from a second account, show the before and after as the owner sees it, and keep the proof minimal: one request, one identifier swap. State the impact in the report's own terms rather than extrapolating, and note any limitation, such as the owner being unable to revert the change, because that strengthens the case that the write is real.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

Facebook has a feature called 3D Posts. It lets a person publish a three-dimensional object, for example a model of a chair or a toy, so that it appears in a post. A 3D post also has a background, the colour or scene placed behind the object.

According to this report, the background is not saved at the moment the 3D object is uploaded through Facebook's API. The API is the programming interface that apps use to talk to Facebook, as opposed to the website a person clicks through. Instead, the background is applied later, by a second, separate request. The researcher found that anyone who knew the object's identifier could set the background of someone else's post, because the background is set in a separate call.

An identifier is just a label the system uses to tell one object apart from another, like a ticket number. If you know the number, you can refer to the object.

The proof of concept is a single request:

HTTP
HTTP POST
/3d/render_settings/create/
Host: facebook.com
asset3d_id=TARGET_ASSET_ID
background=BACKGROUND_TYPE

Line by line:

  1. HTTP POST is the method. A browser uses GET to fetch a page and POST to send data that changes something on the server. POST here means "create or change a setting".
  2. /3d/render_settings/create/ is the address on Facebook's servers that handles the background setting. "Render settings" are the display options used when the 3D object is drawn on screen.
  3. Host: facebook.com says which website the request is aimed at. One server can host many sites, so the request names the one it wants.
  4. asset3d_id=TARGET_ASSET_ID is the identifier of the 3D object. TARGET_ASSET_ID is a placeholder: the attacker would put the victim's real identifier here. This is the key line, because it is how the request points at someone else's object.
  5. background=BACKGROUND_TYPE is the background the attacker wants to apply. BACKGROUND_TYPE is again a placeholder for a real value.

Step by step, as the report describes it:

  1. A victim uploads a 3D object through the API. The post exists, but its background has not been set yet.
  2. The attacker sends the request above, using the victim's asset identifier and a background of their choosing.
  3. The background of the victim's 3D post changes.

The report adds that the original author then cannot change the background themselves.

The timeline was:

Date Event
Feb 21, 2018 Report sent
Feb 21, 2018 Further investigation by Facebook
Mar 28, 2018 Fixed by Facebook
Mar 28, 2018 Bounty awarded by Facebook

The report gives no severity rating, no CVSS score and no bounty amount.

In general, how this kind of bug works

This is a broken object-level authorisation problem, often called IDOR, short for Insecure Direct Object Reference. The idea is simple. A website has to decide, for every action, not only "is this person logged in?" but also "is this person allowed to touch this particular thing?". When the second question is skipped, a logged-in user can act on other people's data just by naming it.

A useful comparison is a hotel. Showing a key card at the front door proves you are a guest. But your card should also open only your room, not every room. A site that checks the front door and forgets the room door has this bug.

Many features are built in stages. Something is created first, and its details are attached afterwards by separate requests. Each of those later requests carries an identifier for the thing being changed. If the server trusts that identifier without confirming that the logged-in user owns the object, anyone who can guess or obtain an identifier can write to someone else's object. This report is a textbook case: the upload creates the 3D post, and a separate call sets its background.

The pattern turns up where the second step was built as a convenience interface, where identifiers are sequential or otherwise easy to enumerate, or where the ownership check lives only in the page's interface rather than on the server. A check in the browser is no protection, because an attacker can send requests directly and never load the page at all.

Defences are straightforward in principle. Every request that acts on an object should load the object from the identifier, compare its owner with the logged-in user, and refuse on a mismatch. The refusal should be a generic error, so the response does not reveal whether the object exists. Where a flow has several steps, the object can be marked incomplete until the flow finishes, and the follow-up requests should accept only incomplete objects, and only from their owner.

How to test for it

  1. Look for features created in more than one request: a create call followed by calls that set attributes, upload media or apply settings. Note the identifiers passed between them.
  2. Create two accounts and one object of the relevant type under each. Record the identifiers of your own objects.
  3. With account A's session, replay the attribute-setting request but substitute account B's object identifier. Keep every other field as the application sent it.
  4. Confirm the write by fetching the object as account B, or as a logged-out viewer, and checking that the attribute changed. A real result is a change the owner can see, not merely a success response.
  5. Repeat with no session, with an expired session, and with a session belonging to an unrelated account, to see which checks exist.

Watch for false positives. The server may report success but silently ignore the write. The change may appear only in the attacker's own view because of caching in the browser. The object may genuinely be shared or public, so the write is intended. Or the identifier may belong to a copy the application made for you. Always verify from the victim's side.

How it is fixed

The report states only that Facebook fixed the issue on Mar 28, 2018. Hard-to-guess identifiers, such as random values, make finding a target harder but do not replace the check. Logging and alerting on cross-account write attempts helps catch the problem if it returns.

Where these bugs hide

They tend to sit in newer or less-used features: media pipelines, render or export settings, draft and staging flows, and anything with a two-phase create. Useful signals are request paths containing words such as create, update or settings that take an object identifier as a parameter, and page scripts that reveal a separate call after an upload. Sequential or short identifiers in your own objects suggest that guessing someone else's is cheap.

To get a report accepted, show a concrete change on an object you control, made from a second account, and show the before and after as the owner sees it. Keep the proof minimal: one request, one identifier swap. Describe the impact in the report's own terms rather than extrapolating, and note any limitation, such as the owner being unable to undo the change, because that strengthens the case that the write is real.

Glossary

  • 3D Post: a Facebook post containing a three-dimensional object, with a background behind it.
  • API: a programming interface that lets software talk to a service, as opposed to the website a person clicks through.
  • Request: a message a browser or app sends to a server asking it to do something.
  • HTTP POST: the request method used to send data that changes something on the server, rather than just fetching a page.
  • Host header: the part of a request that names which website on the server is being addressed.
  • Endpoint: a specific address on a server that handles one kind of action.
  • Parameter: a named value sent with a request, such as background=BACKGROUND_TYPE.
  • Identifier: a label the system uses to tell one object apart from another, like a ticket number.
  • Render settings: the display options used when an object is drawn on screen, including its background.
  • Authorisation: deciding whether a logged-in user is allowed to perform a particular action on a particular thing.
  • Broken object-level authorisation: a flaw where the server checks that a user is logged in but not that they own the object being changed.
  • IDOR (Insecure Direct Object Reference): the common name for that flaw, where naming someone else's object identifier lets you act on it.
  • Session: the state that keeps you logged in across requests, usually carried by a cookie.
  • Cookie: a small piece of data the browser stores and sends back to the site, often used to identify your session.
  • Enumeration: trying many identifiers in sequence to find valid ones.
  • False positive: a test result that looks like a bug but is not, for example because the server ignored the write.
  • CVSS: a standard scoring system for rating the severity of a vulnerability.
  • Bounty: a payment a company makes to a researcher who reports a valid security issue.

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.