Skip to content
Info disclosure Write-up Intermediate

Apple has a security program under which it invites private security researchers to hack them and report the flaws in a coordinated and confidential manner. This hit my mind one day, and I decided to look around their servers.

The password-reset verification endpoint for Apple IDs accepted a phone number via POST, but the same request sent as GET returned account details without authentication. An attacker could learn a victim's country, whether the account is paid, and device and family-pairing details by changing the HTTP method.

Faizan Ahmad Wani Follow

Published on faizanwrites.medium.com

Hello, My name is Faizan. I’m a security researcher.

Faizan Ahmad Wani, on faizanwrites.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. 4 min read.

Context

Apple runs a security programme that invites private security researchers to test its systems and report flaws in a coordinated and confidential manner. The target here is iforgot.apple.com, one of Apple's primary subdomains, used by almost every Apple user to reset their password. The specific flow examined is the password reset verification flow, where a user enters an Apple ID and is then asked for the mobile number associated with that Apple ID so Apple can verify ownership before allowing a reset.

The researcher, Faizan Ahmad Wani, reported the issue to Apple, and after a few discussions and presenting a solid exploitation scenario to the team, Apple fixed it and added him to their Web Server Notification Hall of Fame.

My Hall Of Fame From the original on faizanwrites.medium.com

Setup

No special accounts, roles, tools or versions are described. The testing was done against the live iforgot.apple.com password reset flow, starting from the Apple ID entry endpoint and the phone verification endpoint. The only precondition is knowledge of the victim's Apple ID, which the attacker enters into the reset flow.

Finding it

The researcher's usual approach is to test domains that are recently acquired or little known to other researchers, as that saves time. Here he decided otherwise and went straight at iforgot.apple.com, one of the most used Apple subdomains.

After playing around for a while, he found he could send a random text as a phone number to the server, which the server accepted. At that point he thought of trying some injections. Investigating further, he changed the request method from POST to GET, and the response disclosed information about the user without authentication.

Exploitation

Step 1: Enter the victim's Apple ID

The attacker visits the iforgot endpoint and enters the victim's Apple ID.

From the original on faizanwrites.medium.com

Step 2: Apple asks for the associated mobile number

Before allowing the attacker to reset the password, Apple tries to verify that the attacker really owns the Apple ID, so it asks the attacker to enter the mobile number associated with the Apple ID to verify ownership.

From the original on faizanwrites.medium.com

Step 3: Enter a random value

The attacker enters a very random value as the phone number.

From the original on faizanwrites.medium.com

Step 4: The POST request

The request uses an HTTP POST to deliver the phone number to the server in order to verify it.

From the original on faizanwrites.medium.com

Step 5: Change POST to GET

The attacker changes the HTTP method from POST to GET, and the response lets him read information about the user.

From the original on faizanwrites.medium.com

What could an attacker read?

  1. The country the victim lives in, via the country code, which is not displayed in the front end UI.
  2. Whether the victim's device can be reset with another device.
  3. Whether the victim's account is a paid one.
  4. Whether family device pairing is enabled on the victim's Apple ID.
  5. Whether the victim's current device supports remote unlocking.

Root cause

The researcher sent a random text as a phone number, then changed the request method from POST to GET and the response disclosed information about the user. The same endpoint answered a GET request with information about the account without authentication. The report does not describe the server-side code, so the exact reason the GET handler returned this data is not stated;

Impact

An attacker who knows a victim's Apple ID could read the five attributes listed above without authentication. This information could have aided an adversary in multiple ways; for example, with this information one could think of preparing a massive Apple ID list, which would publish the most vulnerable Apple users worldwide. It also violated Apple's commitment to safeguard users' data and information.

Fix

Apple fixed the issue after the researcher presented a solid exploitation scenario to the team. The report does not describe the specific change that was made.

Variants to test

  1. On other password reset and account recovery flows, submit a random value for the verification field and then replay the same request with the method changed from POST to GET. A positive result is a response that returns account attributes such as country code, account type or device capabilities without the verification step.
  2. Compare the response bodies of the POST and GET variants of the same verification endpoint. A positive result is the GET response containing fields that the POST response does not, or containing fields the front end UI never displays.
  3. Look for other endpoints in the same flow that accept a user identifier and return account metadata, and try each supported HTTP method against them. A positive result is any method that returns data without the ownership check.

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

What happened, in plain words

Apple runs a security programme that invites independent security researchers to test its systems and report flaws privately, in a coordinated and confidential way. One researcher, Faizan Ahmad Wani, decided to look around Apple's servers. He focused on iforgot.apple.com, one of Apple's main subdomains, which almost every Apple user uses to reset a forgotten password.

While testing the password reset flow, he noticed he could type a random piece of text where a phone number was expected, and the server accepted it. That made him think about trying some injections. He investigated further and changed the request method from POST to GET. The response then revealed information about the account without asking him to log in. He reported it to Apple, discussed it with the team and presented a solid exploitation scenario. Apple fixed the issue and added him to their Web Server Notification Hall of Fame.

My Hall Of Fame From the original on faizanwrites.medium.com

The image shows the researcher's Hall of Fame entry.

Before going further, a few words about the pieces involved, because the rest of the article depends on them.

  • Subdomain: a smaller address that belongs to a main domain. If a company's website is a large building, subdomains are the different departments inside it, each with its own door. iforgot.apple.com is one such department of apple.com.
  • Password reset flow: the series of pages a website shows you when you have forgotten your password. You type your account name, the site tries to check that the account really belongs to you, and then it lets you set a new password.
  • Apple ID: the account name an Apple user signs in with. It is often an email address, and it identifies the account across Apple's services.
  • HTTP request: the message your browser sends to a server when you click something or submit a form. Think of it as an order slip you hand to a shop counter: it says what you want and carries your details.
  • HTTP method: the word at the start of that order slip that says what kind of action you want. Two common ones are POST and GET. POST is like handing over a form with information to be processed, for example "here is a phone number, please check it". GET is like asking to look at a page, for example "show me this".
  • Server: the computer on the other side that stores the data and answers requests.
  • Authentication: proving who you are, usually by signing in. Something done "without authentication" happens without the server ever checking who is asking.
  • Injection: a broad family of attacks where you put something unexpected into a field the site trusts, hoping the site will treat it as instructions rather than as plain data. The researcher says he thought of trying some injections; the report does not describe any injection payload he used.
  • API: the part of a server that answers requests from software rather than drawing a page for a human. It is like a restaurant's kitchen window: you pass an order through it and get food back, without walking into the kitchen. The verification endpoint in this story is such a window.

Setting up

The report describes no special accounts, roles, tools or versions. The testing was done against the live iforgot.apple.com password reset flow, starting from the page where you enter an Apple ID and continuing to the page where you enter a phone number. The only thing the attacker needs to know is the victim's Apple ID, which he types into the reset flow.

How he found it

His usual approach is to test domains that were recently acquired by the company or that other researchers rarely look at, because that saves time. This time he did the opposite and went straight at iforgot.apple.com, one of the most used Apple subdomains.

After playing around for a while, he found he could send a random text as a phone number to the server, and the server accepted it. That is the moment he thought of trying some injections. Investigating further, he changed the request method from POST to GET, and the response disclosed information about the user without authentication.

Why does that matter? A normal reset flow is supposed to check that you own the account before telling you anything about it. If a different method on the same address answers with account details and skips the check, the check is only as strong as the method it was written for.

Walking through the attack

Step 1: Enter the victim's Apple ID

The attacker visits the iforgot endpoint and enters the victim's Apple ID.

From the original on faizanwrites.medium.com

This is the ordinary first page of a password reset, the same one any user sees. The attacker is not logged in and has no password; he only knows the account name.

Step 2: Apple asks for the associated mobile number

Before allowing the attacker to reset the password, Apple tries to verify that the attacker really owns the Apple ID, so it asks the attacker to enter the mobile number associated with the Apple ID to verify ownership.

From the original on faizanwrites.medium.com

This is the ownership check: the site assumes that only the real owner knows which number is attached to the account.

Step 3: Enter a random value

The attacker enters a very random value as the phone number.

From the original on faizanwrites.medium.com

The point of this step is to see how the server reacts to input that is clearly not a real number belonging to the account. The report says he could send a random text as a phone number to the server, and at that moment he thought of trying some injections.

Step 4: The POST request

The request uses an HTTP POST to deliver the phone number to the server in order to verify it.

From the original on faizanwrites.medium.com

In plain words: the browser hands the server an order slip that says "POST", and on that slip is the phone number to be checked. POST is the natural choice here because the browser is submitting data for the server to process, not just asking to view a page. The report does not include the raw request text, so there is no code to copy for this step.

Step 5: Change POST to GET

The attacker changes the HTTP method from POST to GET, and the response lets him read information about the user.

From the original on faizanwrites.medium.com

The same address that was asked to verify a phone number is now simply asked to show something, and it answers with account details. The report does not describe the server-side code, so the exact reason the GET handler returned this data is not stated;

What could an attacker read?

  1. The country the victim lives in, via the country code, which is not displayed in the front end UI.
  2. Whether the victim's device can be reset with another device.
  3. Whether the victim's account is a paid one.
  4. Whether family device pairing is enabled on the victim's Apple ID.
  5. Whether the victim's current device supports remote unlocking.

A few of those terms deserve a plain explanation. The country code is the short prefix that identifies a country, and the point here is that the website's visible pages never show it, so the attacker learns something the victim cannot even see about themselves. Remote unlocking means being able to unlock a device from somewhere else rather than physically at the device. Family device pairing means linking devices that belong to members of the same family group. A paid account is one with a paid subscription attached. Each of these is a small fact on its own, but together they describe the account and the devices behind it.

Why it matters

An attacker who knows a victim's Apple ID could read those five attributes without authentication. The researcher notes this information could have aided an adversary in multiple ways; for example, with it one could think of preparing a massive Apple ID list, which would publish the most vulnerable Apple users worldwide. It also violated Apple's commitment to safeguard users' data and information.

The fix

Apple fixed the issue after the researcher presented a solid exploitation scenario to the team.

Things worth trying on other sites

These are the same ideas, phrased for someone who is learning. Only test systems you are allowed to test, such as a programme that invites researchers or your own practice lab.

  1. On other password reset and account recovery flows, submit a random value for the verification field and then replay the same request with the method changed from POST to GET. A positive result is a response that returns account attributes such as country code, account type or device capabilities without the verification step.
  2. Compare the response bodies of the POST and GET variants of the same verification endpoint. A positive result is the GET response containing fields that the POST response does not, or containing fields the front end UI never displays.
  3. Look for other endpoints in the same flow that accept a user identifier and return account metadata, and try each supported HTTP method against them. A positive result is any method that returns data without the ownership check.

Glossary

  • Apple ID: the account name an Apple user signs in with, often an email address.
  • API: the part of a server that answers requests from software, passing data back and forth without drawing a page for a human.
  • Authentication: proving who you are, usually by signing in; something done without authentication happens without the server checking who is asking.
  • Country code: the short prefix that identifies a country.
  • Endpoint: a specific address on a server that accepts requests, like one particular counter window.
  • Family device pairing: linking devices that belong to members of the same family group.
  • GET: an HTTP method used to ask a server to show something.
  • HTTP method: the word at the start of a request that says what kind of action is wanted, such as POST or GET.
  • HTTP request: the message a browser sends to a server when you click or submit something.
  • Injection: an attack where unexpected input is placed in a field the site trusts, hoping the site treats it as instructions rather than data.
  • Paid account: an account with a paid subscription attached.
  • Password reset flow: the series of pages a site shows when you have forgotten your password and want to set a new one.
  • POST: an HTTP method used to hand data to a server for it to process.
  • Remote unlocking: being able to unlock a device from somewhere else rather than physically at the device.
  • Response body: the content a server sends back, as opposed to the status line and headers around it.
  • Server: the computer on the other side that stores data and answers requests.
  • Subdomain: a smaller address belonging to a main domain, such as iforgot.apple.com under apple.com.
  • Web Server Notification Hall of Fame: the page where Apple lists researchers who reported issues to it.

More by Faizan Ahmad Wani

View all

1 more disclosed report, best first.

More from Apple

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.