Skip to content
Info disclosure Write-up Beginner

Story about more than 3.5 million PII leakage in Yahoo!!!

A follow-user API endpoint returned full user PII in an error response when a non-existent user ID was supplied. An attacker could enumerate numeric user IDs to harvest personal data of millions of users.

dhakal_bibek Follow

Published on dhakalbibek.medium.com

Bounty$9,500 View original

This is my first writeup and please accept my apologies for any inconvenience. Let’s get started with the writeup.

dhakal_bibek, on dhakalbibek.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. 7 min read.

Context

Yahoo (Verizon Media) ran a public bug bounty programme, and this write-up describes an information disclosure found in the Rivals iOS application. Rivals is a sports recruiting product; the feature involved here is the "follow" action, where a signed-in user follows another user or site. In the app this is a simple POST to an API endpoint that carries the target user's numeric ID in the path.

The researcher, dhakal_bibek, reports that the endpoint returned the full user record of the target, including personally identifiable information, even when the follow action itself was rejected. The bug was reported on 7 November 2021, triaged and resolved on 9 November 2021, and the bounty was awarded on 30 December 2021. The write-up was published on 14 March 2022, and the researcher notes it was the first write-up to receive official permission for public disclosure from Yahoo after the programme opened a public disclosure process.

Setup

The testing was done on a jailbroken iPhone X. The researcher had spent about four years without a smartphone before receiving the device, and jailbreaking was a deliberate precondition for the work: it allowed installing tweaks and tools used for iOS testing. The tools named in the write-up are:

  • AppSync Unified
  • AppStore++
  • Filza
  • Frida
  • Gravitation
  • mTerminal
  • Nonceset143 (used to store BLOBs)
  • OpenSSH
  • SSL Kill Switch 2
  • mobileAssistant (Burp Suite)
From the original on dhakalbibek.medium.com

Traffic interception used Burp Suite's mobileAssistant, with the Burp proxy configured and injected into the Rivals iOS application. The researcher had previously tested some private programmes with API testing methodologies and had found small and medium severity issues there before turning to Yahoo.

From the original on dhakalbibek.medium.com

No specific account roles, app version or iOS version are given in the report.

Finding it

The researcher was reviewing requests and responses in Burp's history tab when a POST request to follow a user caught their attention. The path contained a numeric user ID:

Text
/api/v1/user/3123XXX/follow

The numeric ID was the signal. The researcher changed it to a random value. The server answered with a 422 error, which on its own looks like a rejection, but the response body contained the full PII of the user whose ID had been supplied. The report describes the reaction as the heart starting to pound: the follow was refused, yet the data came back anyway.

Because the IDs are numeric, the researcher reasoned that enumerating them is trivial, and that a malicious user doing so would have caused a massive data breach. The report states that more than 3 million users' information was exposed by this bug, and that it was found within 20 minutes of testing.

From the original on dhakalbibek.medium.com

Exploitation

Step 1: capture the follow request

With the proxy in place, the researcher followed a user in the Rivals app and captured the request. The request as shown in the write-up is:

HTTP
POST /api/v1/user/3123911/follow HTTP/1.1Host: n.rivals.comAccept: application/jsonContent-Type: application/jsonAccept-Encoding: gzip, deflateConnection: closeIf-None-Match: XXXXxxxXXXXXCookie: _rivalry_session_v2=XXXXXxxxxXXXXXXAuthorization: token XXXXXxxxxxXXXXXXContent-Length: 33Accept-Language: en-us{"follow":{"type":"Site","id":1}}

The important parts are the numeric user ID in the path (3123911), the JSON body declaring a follow of a Site with id 1, and the two credentials: the _rivalry_session_v2 cookie and the Authorization: token header. The request carries a session cookie and an Authorization token, both redacted in the write-up.

Step 2: change the ID

The researcher replaced the ID in the path with a random value and sent the request again. The server returned a 422 Unprocessable Entity, but the body carried the target user's record:

HTTP
HTTP/1.1 422 Unprocessable EntityCache-Control: max-age=0Content-Type: application/json; charset=utf-8Date: Sun, 07 Nov 2021 15:55:44 GMTExpires: Sun, 07 Nov 2021 15:55:44 GMTReferrer-Policy: no-referrer-when-downgradeServer: ATSSet-Cookie: _rivalry_session_v2=XXXXXXXxxxxxXXXXXXStatus: 422 Unprocessable EntityStrict-Transport-Security: max-age=31536000X-Content-Type-Options: nosniffX-Download-Options: noopenX-Frame-Options: SAMEORIGINx-ittl: 0:15mX-Permitted-Cross-Domain-Policies: noneX-Powered-By: Phusion Passenger(R)x-pver: 2.85AX-Request-Id: XXXXxxxxxXXXXXX-Runtime: 0.015939X-XSS-Protection: 1; mode=blockAge: 0Connection: closeExpect-CT: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"Content-Length: 1124{"message":"not allowed to follow? this #\u003cUser id: 3123XXX, email: \"[redacted]\", username: \"VictimName\", terms_and_conditions_accepted_at: \"2021-04-08 23:06:11\", created_at: \"2021-04-08 23:06:11\", updated_at: \"2021-07-25 22:41:56\", braintree_customer_id: nil, role: \"user\", legacy_password_hash: nil, first_name: \"victim\", last_name: \"bicharaBabu\", phone_number: nil, legacy_guid: nil, legacy_id: nil, legacy_password_changedate: nil, comped_all_sites: false, rivals_emails: nil, third_party_emails: nil, banned: false, title: nil, affiliated_site_id: 25, incentive_mail_send_count: 0, email_opt_out_date: nil, comp_all_sites_until: nil, obi_instrument_id: \"9659xxxx\", salt: \"XXXXXXXXXxxxxxxXXXXX\", guce_tos_record: [], accepted_events: nil, is_analyst: nil, obi_customer_id: \"rivalscom-0a6285910d26XXXXxxxxXXX\", inappropriate_username: false, refer_friend_id: nil, inappropriate_user_photo: nil, user_login_token: nil, login_token_valid_until: nil, saved_from_cancellation: nil, compromised: nil, forecast_ban: nil, customer_support_admin_expiration_date: nil\u003e"}

The message field is meant to explain why the follow was refused. Instead it embeds the serialised user object, which includes the email address, username, first and last name, timestamps for terms acceptance, creation and update, the role, the affiliated site ID, the obi_instrument_id, the obi_customer_id, and a salt value. Several fields are nil in this record, including phone_number, legacy_password_hash, legacy_guid, legacy_id, legacy_password_changedate, rivals_emails, third_party_emails, title, email_opt_out_date, comp_all_sites_until, accepted_events, is_analyst, refer_friend_id, inappropriate_user_photo, user_login_token, login_token_valid_until, saved_from_cancellation, compromised, forecast_ban and customer_support_admin_expiration_date. The presence of the salt field alongside a legacy_password_hash field is worth noting for anyone assessing the exposure.

Step 3: enumerate

With a numeric ID and a response that returns data regardless of the 422 status, the remaining step is to iterate over IDs. The report does not include a script or a list of requests for this; it states only that brute forcing the numeric IDs is child's play and that more than 3 million users' information was leaked through the bug.

Root cause

The response suggests the endpoint looks up the user from the path parameter and, when the follow is refused, builds a message that includes the full user object. The report does not describe the server-side code. The failure message returned data the caller had no relationship to. The denial itself carried the object back to the client.

The 422 status is not a defence: clients and intermediaries may treat it as an error, but the body is still delivered to the requester. The numeric, sequential ID makes the exposure enumerable. The report does not describe the server-side code, so the exact ordering of the lookup and the permission check is likely as described above rather than confirmed.

Impact

An authenticated user of the Rivals app could supply arbitrary numeric user IDs to the follow endpoint and receive the corresponding user records, including email addresses, names, usernames and internal identifiers, without any relationship to those users and without the follow succeeding. Because the IDs are numeric, the user base is reachable by iteration. The report states that more than 3 million users' information was leaked through the bug.

Fix

The bug was resolved on 9 November 2021. The general fix is to stop returning the user object in the error message: the failure response should contain a generic message and nothing derived from the target record, and any user data returned by the endpoint should be limited to fields the caller is authorised to see.

Reward

The report records the following: a $5,000 bounty, a $4,500 bonus made up of a Hidden Gem bonus of $4,000 and an Excellent Report Quality bonus of $500 (10%), for a total of $9,500. The team's note in the report reads: "Thank you for this submission. Please keep up the great work!"

Timeline

Event Date
Bug reported 7 November 2021
Triaged 9 November 2021
Resolved 9 November 2021
Bounty awarded 30 December 2021
Write-up published 14 March 2022

Disclosure

The researcher notes that after seven years Yahoo opened a process for public disclosure, and that this was the first write-up to receive official permission from Yahoo.

From the original on dhakalbibek.medium.com

Variants to test

  1. Error messages on state-changing endpoints. Take any POST, PUT or DELETE that acts on an object identified by an ID and force the action to fail (invalid state, missing permission, malformed body). A positive result is a 4xx body that contains fields of the target object, such as an email, name or internal identifier, that the caller could not otherwise read.
  2. Numeric and sequential identifiers. Wherever an ID appears in a path or body, substitute a neighbouring value. A positive result is a response that differs per ID and discloses data, even if the status code is an error.
  3. Authorisation checks separated from serialisation. Look for endpoints where the permission check and the object rendering happen in different layers. A positive result is a denial response whose body was clearly produced from the fetched record rather than from a static message.
  4. Mobile API surfaces. The same backend often serves the web app and the mobile app with different error handling. A positive result is a mobile-only endpoint that leaks more in its error path than the web equivalent.
  5. Sensitive fields in serialised objects. When a record is returned, check for fields such as password hashes, salts, tokens and internal customer IDs. A positive result is any of these appearing in a response to a caller who should not see them.

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

What happened, in plain words

A security researcher found a bug in the Rivals iOS app, a sports recruiting product run by Yahoo (Verizon Media). The app has a "follow" feature: you tap to follow another user or a site, and the app sends a small message to Yahoo's servers asking them to record that follow. The researcher noticed that when the follow was refused, the server's refusal message still contained the full private record of the person being followed: their email address, name, username and various internal identifiers. Because every user has a simple number as an ID, the researcher reasoned that walking through the numbers one by one would expose the details of millions of users. The researcher reported it, Yahoo resolved it, and paid a total of $9,500.

This article explains the whole story from zero. You only need to be comfortable using a browser and a computer. Every technical word is explained where it first appears, and there is a glossary at the end.

Some background ideas first

Before the story makes sense, here are a few concepts in everyday terms.

A server and a request. When you use an app or a website, your device sends a request to a computer somewhere else (the server) and the server sends back a response. Think of it as posting a letter with a question and getting a letter back with the answer.

An API. An API (Application Programming Interface) is the set of addresses and message formats a server accepts from apps, as opposed to the pages a browser shows a human. If a website is a restaurant's dining room, the API is the serving hatch where the kitchen passes dishes to the waiters. Apps talk to APIs constantly, and so do websites behind the scenes.

An endpoint. An endpoint is one specific address on that API, for example the one that handles "follow this user". Each endpoint has a path, like a street address, and often expects a particular kind of message.

HTTP methods. Requests carry a method that says what kind of action is wanted. GET means "give me something", POST means "create or change something". The follow action is a POST because it changes data on the server.

Status codes. Every response starts with a three-digit number. 200 means success. Numbers starting with 4 mean the request was refused for some reason: 404 means not found, 403 means forbidden, and 422 means the server understood the request but could not process it (often because the data was not acceptable). The important point for this story is that a 4xx is still a response, and it can still carry a body full of data.

A cookie. A cookie is a small piece of text that a server gives your app or browser after you log in, and that your device sends back with every later request so the server knows who you are. It works like a wristband at an event: you show it at the door and you are let in without showing your ticket again.

A token. A token is similar: a string of characters that proves you are logged in. In this story the app sends both a cookie and an Authorization: token header. A header is a labelled line at the top of a request or response carrying extra information, like the address block on an envelope.

JSON. JSON is a common text format for structured data, made of names and values in curly braces. It is how most APIs send information back and forth.

PII. Personally Identifiable Information: data that identifies a real person, such as a name, email address or phone number.

IDOR. Insecure Direct Object Reference. It means the server lets you name an object (a user, an order, a file) directly by its ID, and does not check whether you are allowed to see that particular object. If you can change the number in the request and get someone else's data, that is an IDOR. A simple comparison: a cloakroom that hands out any coat to anyone who says a ticket number, without checking the ticket belongs to them.

Information disclosure. Simply put, the server reveals data to someone who should not have it. It does not have to be a dramatic break-in; a careless error message is enough.

Brute force / enumeration. Trying many values one after another, usually with a computer, until you find what you want. If IDs are sequential numbers (1, 2, 3...), enumerating them is like reading every page of a phone book in order.

A proxy. A tool that sits between your device and the server, so every request and response passes through it and can be read and edited. Burp Suite is a well-known proxy used by security testers. Think of a mailroom that opens every letter, copies it, and then sends it on.

Jailbreaking. Removing the restrictions Apple places on an iPhone so that software Apple does not allow can be installed. It is a precondition for many iOS testing tools, because those tools need deeper access than a normal iPhone gives.

A tweak. In the jailbreak world, a small add-on package that changes how iOS behaves.

Context

Yahoo (Verizon Media) ran a public bug bounty programme. A bug bounty programme is an arrangement where a company invites outside researchers to look for security problems and pays them for reporting them responsibly instead of exploiting them. This write-up describes an information disclosure found in the Rivals iOS application. Rivals is a sports recruiting product; the feature involved here is the "follow" action, where a signed-in user follows another user or site. In the app this is a simple POST to an API endpoint that carries the target user's numeric ID in the path.

The researcher, dhakal_bibek, reports that the endpoint returned the full user record of the target, including personally identifiable information, even when the follow action itself was rejected. The bug was reported on 7 November 2021, triaged and resolved on 9 November 2021, and the bounty was awarded on 30 December 2021. Triaged means the company's security team looked at the report, confirmed it was real, and passed it to the engineers to fix. The write-up was published on 14 March 2022, and the researcher notes it was the first write-up to receive official permission for public disclosure from Yahoo after the programme opened a public disclosure process. Public disclosure means the company agrees the details can be published, so other people can learn from them.

Setup

The testing was done on a jailbroken iPhone X. The researcher had spent about four years without a smartphone before receiving the device, and jailbreaking was a deliberate precondition for the work: it allowed installing tweaks and tools used for iOS testing. The tools named in the write-up are:

  • AppSync Unified
  • AppStore++
  • Filza
  • Frida
  • Gravitation
  • mTerminal
  • Nonceset143 (used to store BLOBs)
  • OpenSSH
  • SSL Kill Switch 2
  • mobileAssistant (Burp Suite)
From the original on dhakalbibek.medium.com

You do not need to know what each of these does to follow the story. The two that matter are mobileAssistant, which is part of Burp Suite and helps route an iPhone's traffic through the proxy, and SSL Kill Switch 2, which helps the proxy read encrypted traffic from the app. SSL (more precisely TLS) is the encryption that protects traffic between an app and a server; without help, a proxy sees only scrambled bytes.

Traffic interception used Burp Suite's mobileAssistant, with the Burp proxy configured and injected into the Rivals iOS application. The researcher had previously tested some private programmes with API testing methodologies and had found small and medium severity issues there before turning to Yahoo. Severity is how serious a bug is judged to be, usually from low to critical.

From the original on dhakalbibek.medium.com

No specific account roles, app version or iOS version are given in the report.

Finding it

The researcher was reviewing requests and responses in Burp's history tab when a POST request to follow a user caught their attention. The history tab is simply a list of every request and response the proxy has seen, like a call log. The path contained a numeric user ID:

Text
/api/v1/user/3123XXX/follow

Reading this path from left to right: /api/v1/ says this is version 1 of the API; /user/ says we are dealing with a user; 3123XXX is that user's ID number; /follow says the action is to follow them. The XXX in the report stands for digits the researcher blanked out.

The numeric ID was the signal. The researcher changed it to a random value. The server answered with a 422 error, which on its own looks like a rejection, but the response body contained the full PII of the user whose ID had been supplied. The report describes the reaction as the heart starting to pound: the follow was refused, yet the data came back anyway.

Because the IDs are numeric, the researcher reasoned that enumerating them is trivial, and that a malicious user doing so would have caused a massive data breach. The report states that more than 3 million users' information was exposed by this bug, and that it was found within 20 minutes of testing.

From the original on dhakalbibek.medium.com

Exploitation

Step 1: capture the follow request

With the proxy in place, the researcher followed a user in the Rivals app and captured the request. The idea is to let the app do the work normally, then look at exactly what it sent, so you can replay and modify it. The request as shown in the write-up is:

HTTP
POST /api/v1/user/3123911/follow HTTP/1.1Host: n.rivals.comAccept: application/jsonContent-Type: application/jsonAccept-Encoding: gzip, deflateConnection: closeIf-None-Match: XXXXxxxXXXXXCookie: _rivalry_session_v2=XXXXXxxxxXXXXXXAuthorization: token XXXXXxxxxxXXXXXXContent-Length: 33Accept-Language: en-us{"follow":{"type":"Site","id":1}}

Line by line, in plain words:

  • POST /api/v1/user/3123911/follow HTTP/1.1 is the request line. The method is POST, the path names user 3123911 and the action follow, and HTTP/1.1 is the version of the web protocol being used.
  • Host: n.rivals.com says which server the request is for. The n. prefix is part of the hostname.
  • Accept: application/json tells the server the app would like JSON back.
  • Content-Type: application/json says the body being sent is JSON.
  • Accept-Encoding: gzip, deflate says the app can accept compressed responses.
  • Connection: close asks the server to close the connection after answering.
  • If-None-Match: XXXXxxxXXXXX is a caching header: it lets the server say "nothing has changed" instead of resending something. The value is blanked out in the report.
  • Cookie: _rivalry_session_v2=XXXXXxxxxXXXXXX is the session cookie that identifies the logged-in user. It is redacted here, and it would be a secret in real life: anyone holding it could act as that user.
  • Authorization: token XXXXXxxxxxXXXXXX is a second credential, a token, also redacted.
  • Content-Length: 33 says the body is 33 bytes long.
  • Accept-Language: en-us says the app prefers English (US).
  • {"follow":{"type":"Site","id":1}} is the body: it asks to follow something of type Site with id 1.

The important parts are the numeric user ID in the path (3123911), the JSON body declaring a follow of a Site with id 1, and the two credentials: the _rivalry_session_v2 cookie and the Authorization: token header. The request carries a session cookie and an Authorization token, both redacted in the write-up. Authenticated means the server knows who is making the request, because the credentials prove it.

Step 2: change the ID

The researcher replaced the ID in the path with a random value and sent the request again. This is the core of an IDOR test: keep everything else the same, change only the identifier, and see whether the server hands back something that belongs to someone else. The server returned a 422 Unprocessable Entity, but the body carried the target user's record:

HTTP
HTTP/1.1 422 Unprocessable EntityCache-Control: max-age=0Content-Type: application/json; charset=utf-8Date: Sun, 07 Nov 2021 15:55:44 GMTExpires: Sun, 07 Nov 2021 15:55:44 GMTReferrer-Policy: no-referrer-when-downgradeServer: ATSSet-Cookie: _rivalry_session_v2=XXXXXXXxxxxxXXXXXXStatus: 422 Unprocessable EntityStrict-Transport-Security: max-age=31536000X-Content-Type-Options: nosniffX-Download-Options: noopenX-Frame-Options: SAMEORIGINx-ittl: 0:15mX-Permitted-Cross-Domain-Policies: noneX-Powered-By: Phusion Passenger(R)x-pver: 2.85AX-Request-Id: XXXXxxxxxXXXXXX-Runtime: 0.015939X-XSS-Protection: 1; mode=blockAge: 0Connection: closeExpect-CT: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"Content-Length: 1124{"message":"not allowed to follow? this #\u003cUser id: 3123XXX, email: \"[redacted]\", username: \"VictimName\", terms_and_conditions_accepted_at: \"2021-04-08 23:06:11\", created_at: \"2021-04-08 23:06:11\", updated_at: \"2021-07-25 22:41:56\", braintree_customer_id: nil, role: \"user\", legacy_password_hash: nil, first_name: \"victim\", last_name: \"bicharaBabu\", phone_number: nil, legacy_guid: nil, legacy_id: nil, legacy_password_changedate: nil, comped_all_sites: false, rivals_emails: nil, third_party_emails: nil, banned: false, title: nil, affiliated_site_id: 25, incentive_mail_send_count: 0, email_opt_out_date: nil, comp_all_sites_until: nil, obi_instrument_id: \"9659xxxx\", salt: \"XXXXXXXXXxxxxxxXXXXX\", guce_tos_record: [], accepted_events: nil, is_analyst: nil, obi_customer_id: \"rivalscom-0a6285910d26XXXXxxxxXXX\", inappropriate_username: false, refer_friend_id: nil, inappropriate_user_photo: nil, user_login_token: nil, login_token_valid_until: nil, saved_from_cancellation: nil, compromised: nil, forecast_ban: nil, customer_support_admin_expiration_date: nil\u003e"}

Line by line, in plain words:

  • HTTP/1.1 422 Unprocessable Entity is the status line: the server understood the request but refused to carry it out.
  • Cache-Control: max-age=0 and Expires: Sun, 07 Nov 2021 15:55:44 GMT tell caches not to keep this response.
  • Content-Type: application/json; charset=utf-8 says the body is JSON text.
  • Date: Sun, 07 Nov 2021 15:55:44 GMT is when the server produced the response.
  • Referrer-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Download-Options, X-Frame-Options, X-Permitted-Cross-Domain-Policies and X-XSS-Protection are security-related headers that tell the client how to behave. They are standard hardening and not the bug.
  • Server: ATS names the server software.
  • Set-Cookie: _rivalry_session_v2=XXXXXXXxxxxxXXXXXX is the server handing back a session cookie, redacted here.
  • Status: 422 Unprocessable Entity repeats the status in a header.
  • x-ittl: 0:15m and x-pver: 2.85A are custom headers whose meaning the report does not explain.
  • X-Powered-By: Phusion Passenger(R) names a piece of server software.
  • X-Request-Id: XXXXxxxxxXXXXXX is an identifier for this request, useful for support and logging.
  • X-Runtime: 0.015939 is how long the server took, in seconds.
  • Age: 0 says the response is fresh, not served from a cache.
  • Connection: close says the connection will be closed after this response.
  • Expect-CT: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only" is a certificate-related security header.
  • Content-Length: 1124 says the body is 1124 bytes long.
  • The body is a JSON object with a single field, message. That field is meant to explain why the follow was refused. Instead it embeds the serialised user object. Serialised means the record was turned into text so it could be sent over the network.

The embedded record includes the email address, username, first and last name, timestamps for terms acceptance, creation and update, the role, the affiliated site ID, the obi_instrument_id, the obi_customer_id, and a salt value. A salt is random data mixed into a password before it is hashed, so that two people with the same password do not end up with the same stored value. Seeing a salt in a response is a warning sign, because it belongs with password storage, not with a follow action. Several fields are nil in this record, which in this format means empty or not set, including phone_number, legacy_password_hash, legacy_guid, legacy_id, legacy_password_changedate, rivals_emails, third_party_emails, title, email_opt_out_date, comp_all_sites_until, accepted_events, is_analyst, refer_friend_id, inappropriate_user_photo, user_login_token, login_token_valid_until, saved_from_cancellation, compromised, forecast_ban and customer_support_admin_expiration_date. The presence of the salt field alongside a legacy_password_hash field is worth noting for anyone assessing the exposure: even when empty, their existence shows what the server is prepared to send.

Step 3: enumerate

With a numeric ID and a response that returns data regardless of the 422 status, the remaining step is to iterate over IDs. The report does not include a script or a list of requests for this; it states only that brute forcing the numeric IDs is child's play and that more than 3 million users' information was leaked through the bug.

Root cause

The response suggests the endpoint looks up the user from the path parameter and, when the follow is refused, builds a message that includes the full user object. The report does not describe the server-side code. Interpolates means it inserts the object's text into a sentence, the way a mail merge inserts a name into a letter. The failure message returned data the caller had no relationship to. The denial itself carried the object back to the client.

The 422 status is not a defence: clients and intermediaries may treat it as an error, but the body is still delivered to the requester. The numeric, sequential ID makes the exposure enumerable.

Impact

An authenticated user of the Rivals app could supply arbitrary numeric user IDs to the follow endpoint and receive the corresponding user records, including email addresses, names, usernames and internal identifiers, without any relationship to those users and without the follow succeeding. Because the IDs are numeric, the user base is reachable by iteration. The report states that more than 3 million users' information was leaked through the bug.

Fix

The bug was resolved on 9 November 2021. The general fix is to stop returning the user object in the error message: the failure response should contain a generic message and nothing derived from the target record, and any user data returned by the endpoint should be limited to fields the caller is authorised to see.

Reward

The report records the following: a $5,000 bounty, a $4,500 bonus made up of a Hidden Gem bonus of $4,000 and an Excellent Report Quality bonus of $500 (10%), for a total of $9,500. The team's note in the report reads: "Thank you for this submission. Please keep up the great work!"

Timeline

Event Date
Bug reported 7 November 2021
Triaged 9 November 2021
Resolved 9 November 2021
Bounty awarded 30 December 2021
Write-up published 14 March 2022

Disclosure

The researcher notes that after seven years Yahoo opened a process for public disclosure, and that this was the first write-up to receive official permission from Yahoo.

From the original on dhakalbibek.medium.com

Variants to test

These are the same lessons applied to other situations, written so that a beginner can try them on a programme they are allowed to test.

  1. Error messages on state-changing endpoints. Take any POST, PUT or DELETE that acts on an object identified by an ID and force the action to fail (invalid state, missing permission, malformed body). A positive result is a 4xx body that contains fields of the target object, such as an email, name or internal identifier, that the caller could not otherwise read.
  2. Numeric and sequential identifiers. Wherever an ID appears in a path or body, substitute a neighbouring value. A positive result is a response that differs per ID and discloses data, even if the status code is an error.
  3. Authorisation checks separated from serialisation. Look for endpoints where the permission check and the object rendering happen in different layers. A positive result is a denial response whose body was clearly produced from the fetched record rather than from a static message.
  4. Mobile API surfaces. The same backend often serves the web app and the mobile app with different error handling. A positive result is a mobile-only endpoint that leaks more in its error path than the web equivalent.
  5. Sensitive fields in serialised objects. When a record is returned, check for fields such as password hashes, salts, tokens and internal customer IDs. A positive result is any of these appearing in a response to a caller who should not see them.

Glossary

  • API: the set of addresses and message formats a server accepts from apps, as opposed to the pages a browser shows a person.
  • Authenticated: the server knows who is making a request because valid credentials were supplied.
  • Body: the main content of a request or response, after the headers.
  • Brute force: trying many values one after another, usually automatically, until the wanted one is found.
  • Bug bounty programme: an arrangement where a company pays outside researchers for reporting security problems responsibly.
  • Cookie: a small piece of text a server gives a client after login, sent back with later requests to identify the client.
  • Endpoint: one specific address on an API that handles one kind of action.
  • Enumeration: walking through a list of possible values, such as sequential IDs, one by one.
  • Header: a labelled line at the top of a request or response carrying extra information.
  • HTTP: the protocol used for requests and responses between clients and web servers.
  • IDOR: Insecure Direct Object Reference; naming an object directly by its ID and receiving it without a check that you are allowed to see it.
  • Information disclosure: the server revealing data to someone who should not have it.
  • Interpolate: insert a value into a piece of text, as in a mail merge.
  • Jailbreaking: removing Apple's restrictions on an iPhone so that software Apple does not allow can be installed.
  • JSON: a text format for structured data made of names and values in curly braces.
  • Method: the part of a request that says what kind of action is wanted, such as GET or POST.
  • mobileAssistant: a Burp Suite tool that helps route an iOS device's traffic through the proxy.
  • nil: in this data format, empty or not set.
  • PII: Personally Identifiable Information; data that identifies a real person, such as a name or email address.
  • POST: an HTTP method meaning create or change something.
  • Proxy: a tool that sits between a client and a server so traffic can be read and edited.
  • Public disclosure: the company agreeing that details of a bug can be published.
  • Request: a message a client sends to a server asking for something or asking it to do something.
  • Response: the message a server sends back.
  • Salt: random data mixed into a password before hashing so identical passwords do not produce identical stored values.
  • Serialise: turn a record into text so it can be sent over a network.
  • Severity: how serious a bug is judged to be, usually from low to critical.
  • SSL / TLS: the encryption that protects traffic between a client and a server.
  • Status code: the three-digit number at the start of a response saying whether it succeeded or was refused.
  • Token: a string of characters that proves a client is logged in.
  • Triage: the step where a security team confirms a report is real and passes it to engineers.
  • Tweak: in the jailbreak world, a small add-on package that changes how iOS behaves.
  • 422: an HTTP status meaning the server understood the request but could not process it.

More by dhakal_bibek

View all

2 more disclosed reports, best first.

More from Yahoo! / Verizon Media

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.