Skip to content
Info disclosure Write-up Beginner

1-800-Flowers Credentials and message log leak via facebook.com/facebook

Philippe Harewood Follow

Published on philippeharewood.com

Facebook messaging bot (https://www.facebook.com/facebook) has a picture that points to a resource in an open bucket https://platf-prod.s3.us-west-2.amazonaws.com/. This bucket contains app secrets for http://platform.assi.st/ and 1-800-Flowers.

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.

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. 4 min read.

Context

The target here is the Facebook messaging bot on the page https://www.facebook.com/facebook. A messaging bot is a page-side integration that answers messages sent to a Facebook page, and it is configured with page access tokens and app secrets so that the platform can authenticate it against Facebook's APIs and against the bot developer's own backend.

The bot's profile picture on that page pointed at a resource hosted in an Amazon S3 bucket, https://platf-prod.s3.us-west-2.amazonaws.com/. That bucket was open, and it held more than the image: app secrets for http://platform.assi.st/ and for 1-800-Flowers, an active page token with access to messages, and a full tracking log from 2018 containing page-scoped users and phone numbers.

Setup

The bucket allowed public listing of its contents, and the bot's profile picture pointed into it. The researcher synchronised the brand report prefix with aws s3 sync. The files were then unzipped.

Finding it

The starting point was the picture on the Facebook messaging bot page. Instead of being served from Facebook's own infrastructure, it resolved to an object in platf-prod.s3.us-west-2.amazonaws.com. An S3 bucket that serves a public image is not itself a problem, but if the bucket policy also permits listing, anyone who learns the bucket name can enumerate everything in it. That is what had happened: the bucket was publicly listing its content, and the listing exposed folders beyond the media files, including a brand_report prefix.

Exploitation

Step 1: pull the bucket contents

The researcher synchronised the brand_report prefix to the local machine:

Bash
aws s3 sync s3://platf-prod/brand_report/ .

aws s3 sync copies objects under the given prefix that are not already present locally. The files were then unzipped.

Step 2: inspect the tracking log

The archive contained 1800FLOWERS-FACEBOOK-1-tracking.txt, which holds metadata for callbacks to the 1-800-Flowers bot at https://www.facebook.com/1800FlowersAssistant/. A quick check of the messages counted about 32,543 entries and about 1,442 phone numbers.

Step 3: inspect the production configuration

The archive also contained 1800FLOWERS-FACEBOOK-1-PRODUCTION.json, which holds Facebook secrets and Stripe.com API secrets.

Root cause

The mistake was in the bucket configuration: the S3 bucket was publicly listing its content, so objects that were never meant to be discoverable, including generated brand reports with credentials and customer data, could be enumerated and downloaded by anyone who knew the bucket name. The bucket name was effectively disclosed by the bot's own profile picture, which pointed into it. The report does not describe the bucket policy itself, so the exact statement that allowed listing is not shown; the likely cause is a policy or ACL that granted public read and list rather than read on individual objects only.

Impact

The exposed material included app secrets for platform.assi.st and 1-800-Flowers, an active page token with access to messages, and a tracking log from 2018 with page-scoped users and phone numbers. In Facebook's own assessment, the 1800FLOWERS folder contained several access tokens and app secrets as well as data from the bot itself, including phone numbers, emails and messages from customers who had interacted with the bot. The majority of the messages in 1800FLOWERS-FACEBOOK-1-tracking.txt were from the bot itself. Of the access tokens, all page access tokens, one was still active on a page with roughly 1,000 likes. One active app secret belonged to an app used for testing, and that app had no access to user data.

Facebook considered the report under its expansion of the Whitehat program for third-party apps and under its data abuse program, but the total number of affected people was below the threshold for a reward.

Fix

According to Facebook, the company that owns the bucket acknowledged the problem and altered its configuration so it no longer publicly listed its content. The researcher also sent Facebook a notice on 17 November 2019 that the bucket permissions had changed.

Timeline

Date Event
Oct 17, 2019 Report sent
Oct 21, 2019 Clarification by Facebook requested
Oct 21, 2019 Clarification sent
Oct 24, 2019 Confirmation by Facebook
Nov 17, 2019 Notice sent to Facebook that bucket permissions changed
Dec 17, 2019 Report marked as out of scope by Facebook
Jan 6, 2020 Report clarified by Facebook

Variants to test

  1. Follow image and media URLs on bot and page profiles back to their storage host. A positive result is a hostname that resolves to an object store bucket rather than the platform's own CDN.
  2. Try listing the bucket or a prefix once the name is known, for example with aws s3 ls s3://bucket-name/ or aws s3 sync. A positive result is a directory listing or a successful sync of objects that were not meant to be public.
  3. Check sibling prefixes of any public media prefix, such as report, export, backup or test folders. A positive result is generated artefacts containing credentials, tokens or customer data.
  4. Inspect any downloaded JSON configuration for access tokens and third-party API keys, then check whether the tokens are still active. A positive result is a token that still authenticates against the platform.
  5. Look for tracking or callback logs in the same storage. A positive result is a log with user identifiers, phone numbers or message content from real interactions.

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. 9 min read.

What happened, in plain words

Facebook pages can have a robot helper attached to them, called a messaging bot. When you send a message to a page, the bot can answer you automatically. To do that, the bot has to prove to Facebook that it is allowed to read and send messages on the page's behalf. It does this with special passwords called tokens and secrets.

One of these bots lives on the page https://www.facebook.com/facebook. The little picture on that bot's profile was not stored on Facebook's own computers. It was stored in an Amazon S3 bucket, which is a kind of online filing cabinet that companies rent from Amazon. The bucket was set up so that anyone on the internet could ask it for a list of everything inside, not just the one picture. When the researcher looked, the cabinet also held secret passwords for two bots, a working token that could read messages, and a log file from 2018 full of phone numbers and message details.

This kind of mistake is often called an AWS misconfiguration. AWS is Amazon Web Services, Amazon's cloud service. A misconfiguration means the settings were wrong: the cabinet was left unlocked and with an index taped to the door.

The pieces involved

Before the steps, here are the things you need to recognise.

  • A Facebook page and its bot. A page is a public profile for a business or brand. A messaging bot is a program that answers messages sent to that page. It is configured with page access tokens and app secrets so that Facebook and the bot developer's own servers can check who it is.
  • A page access token. Think of it as a temporary key card. Whoever holds it can act as the page: read its messages, send replies. It is a string of characters, and it works without a username or password.
  • An app secret. A longer-lived password that belongs to a Facebook app (the software behind the bot). It is used to prove the app's identity to Facebook.
  • An S3 bucket. Amazon's storage. You put files (called objects) into it, grouped in folders (called prefixes). A bucket can be set to private, or to let anyone read a single file, or, if someone makes a mistake, to let anyone list everything inside.
  • The AWS CLI. A command-line tool that lets you talk to Amazon's storage from your own computer. aws s3 sync is one of its commands: it copies files from a bucket to your machine.
  • A tracking log. A text file where a bot writes down what happened: who messaged, when, and what was said. Useful for debugging, dangerous if it leaks.

Setting up

The bucket allowed public listing of its contents, and the bot's profile picture pointed into it. The researcher synchronised the brand report prefix with aws s3 sync. The files were then unzipped.

In plain terms: you did not need to log in anywhere. You just needed a browser to spot where the picture came from, and a free command-line tool to copy the files down.

Finding it

The starting point was the picture on the Facebook messaging bot page. Instead of being served from Facebook's own infrastructure, it resolved to an object in platf-prod.s3.us-west-2.amazonaws.com. An S3 bucket that serves a public image is not itself a problem, but if the bucket policy also permits listing, anyone who learns the bucket name can enumerate everything in it. That is what had happened: the bucket was publicly listing its content, and the listing exposed folders beyond the media files, including a brand_report prefix.

To picture this: a shop can put one poster in its window for everyone to see. That is fine. The mistake is leaving the stockroom door open next to it, with a sign saying "everything in here, help yourself".

Exploitation

Step 1: pull the bucket contents

The researcher synchronised the brand_report prefix to the local machine:

Bash
aws s3 sync s3://platf-prod/brand_report/ .

Line by line:

  • aws runs the Amazon command-line tool.
  • s3 says you want to work with Amazon's storage service.
  • sync means "make my local copy match the remote folder": download anything that is there and not yet on my machine.
  • s3://platf-prod/brand_report/ is the address of the remote folder. s3:// is the prefix that means "this is an S3 bucket". platf-prod is the bucket name. brand_report is the folder inside it.
  • . (a single dot) means "put the files here, in the folder I am currently in".

The files were then unzipped.

Step 2: inspect the tracking log

The archive contained 1800FLOWERS-FACEBOOK-1-tracking.txt, which holds metadata for callbacks to the 1-800-Flowers bot at https://www.facebook.com/1800FlowersAssistant/. A quick check of the messages counted about 32,543 entries and about 1,442 phone numbers.

Why this matters: a log like this records real people. Phone numbers are personal data. Even if the messages themselves are mostly automated replies, the list of who messaged is sensitive.

Step 3: inspect the production configuration

The archive also contained 1800FLOWERS-FACEBOOK-1-PRODUCTION.json, which holds Facebook secrets and Stripe.com API secrets.

A JSON file is a plain text file that stores settings in a structured way, a bit like a form with labelled boxes. Stripe is a payment company; its API secrets are keys that let software charge cards and read payment data. Finding those in a public bucket is serious.

Why it happened

The mistake was in the bucket configuration: the S3 bucket was publicly listing its content, so objects that were never meant to be discoverable, including generated brand reports with credentials and customer data, could be enumerated and downloaded by anyone who knew the bucket name. The bucket name was effectively disclosed by the bot's own profile picture, which pointed into it. The report does not describe the bucket policy itself, so the exact statement that allowed listing is not shown; the likely cause is a policy or ACL that granted public read and list rather than read on individual objects only.

An ACL is an access control list, a short list attached to a file or folder saying who may do what. "Read" means open one file. "List" means see the names of everything in the folder. The second is the dangerous one here.

What was exposed

The exposed material included app secrets for platform.assi.st and 1-800-Flowers, an active page token with access to messages, and a tracking log from 2018 with page-scoped users and phone numbers. In Facebook's own assessment, the 1800FLOWERS folder contained several access tokens and app secrets as well as data from the bot itself, including phone numbers, emails and messages from customers who had interacted with the bot. The majority of the messages in 1800FLOWERS-FACEBOOK-1-tracking.txt were from the bot itself. Of the access tokens, all page access tokens, one was still active on a page with roughly 1,000 likes. One active app secret belonged to an app used for testing, and that app had no access to user data.

Facebook considered the report under its expansion of the Whitehat program for third-party apps and under its data abuse program, but the total number of affected people was below the threshold for a reward.

A bug bounty program is a scheme where a company pays people who report security problems. A threshold is a minimum size: below it, no payment.

The fix

According to Facebook, the company that owns the bucket acknowledged the problem and altered its configuration so it no longer publicly listed its content. The researcher also sent Facebook a notice on 17 November 2019 that the bucket permissions had changed.

In everyday terms: someone closed the stockroom door and took down the sign.

Timeline

Date Event
Oct 17, 2019 Report sent
Oct 21, 2019 Clarification by Facebook requested
Oct 21, 2019 Clarification sent
Oct 24, 2019 Confirmation by Facebook
Nov 17, 2019 Notice sent to Facebook that bucket permissions changed
Dec 17, 2019 Report marked as out of scope by Facebook
Jan 6, 2020 Report clarified by Facebook

"Out of scope" means the company decided the report did not fall under the rules of its bounty program, so it would not be treated as a paid finding.

Things to try yourself

These are patterns to look for, not instructions to attack anyone. Only test systems you own or have permission to test.

  1. Follow image and media URLs on bot and page profiles back to their storage host. A positive result is a hostname that resolves to an object store bucket rather than the platform's own CDN. A CDN is a content delivery network, a service that serves files quickly from many locations; if the address points at Amazon storage instead, that is worth a closer look.
  2. Try listing the bucket or a prefix once the name is known, for example with aws s3 ls s3://bucket-name/ or aws s3 sync. A positive result is a directory listing or a successful sync of objects that were not meant to be public.
  3. Check sibling prefixes of any public media prefix, such as report, export, backup or test folders. A positive result is generated artefacts containing credentials, tokens or customer data. An artefact is simply a file produced by a program, like a report or an export.
  4. Inspect any downloaded JSON configuration for access tokens and third-party API keys, then check whether the tokens are still active. A positive result is a token that still authenticates against the platform. An API is the set of doors a program offers other programs to talk to it; a key or token is the key to those doors.
  5. Look for tracking or callback logs in the same storage. A positive result is a log with user identifiers, phone numbers or message content from real interactions.

Glossary

  • API: the set of rules and addresses that let one program talk to another, like a service counter with specific windows.
  • App secret: a password that identifies a Facebook app to Facebook's systems.
  • AWS: Amazon Web Services, Amazon's cloud computing platform.
  • AWS CLI: the command-line tool used to talk to AWS services from a computer.
  • AWS misconfiguration: a cloud setting left wrong, for example a storage folder that anyone can list.
  • Bucket: a storage container in Amazon S3, like a folder at the top level.
  • Bucket policy: the rules attached to a bucket saying who may read, list or write.
  • ACL: access control list, a short per-file or per-folder list of who may do what.
  • CDN: content delivery network, a service that serves files from many locations close to users.
  • Callback: a message a service sends back to a program when something happens, such as a new message arriving.
  • Credential: any secret used to prove identity, such as a password, token or key.
  • JSON: a plain-text format for storing structured settings and data.
  • Log: a file where a program records events as they happen.
  • Messaging bot: a program that automatically reads and answers messages sent to a page.
  • Object: a single file stored in an S3 bucket.
  • Out of scope: a report that the company decides does not fall under its bounty program rules.
  • Page access token: a key that lets its holder act as a Facebook page, including reading and sending messages.
  • Prefix: a folder-like grouping inside an S3 bucket.
  • S3: Amazon's object storage service.
  • Stripe: a payment processing company; its API secrets allow software to handle card payments.
  • Sync: copy files so that a local folder matches a remote one.
  • Token: a string of characters that acts like a key card, granting access without a username and password.
  • Tracking log: a log recording who interacted with a bot and what happened.
  • Whitehat program: a company scheme that rewards people who report security problems responsibly.

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.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.