IDOR, unpin posts for fun.
An endpoint that unpins a company page post accepted a company ID and a version tag from the request, and the version tag for any company could be read from a separate API endpoint without authorisation. An attacker could therefore unpin posts on any company page by supplying that company's ID and its version tag.
Published on medium.com
Hey guys, I’m here to share my recent IDOR on LinkedIn bug bounty program on h1 which enabled me to unpin any pages/companies’ posts without any permissions.
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the unpin endpoint authorised the action using a client-supplied company ID and version tag, and the version tag was readable for any company from an unauthenticated API endpoint, so no real ownership check was performed.
Impact
An attacker could unpin any company page's pinned post, though the programme rated the business impact as low.
What the attacker needed
A LinkedIn account; knowledge of the target company ID
The fix
The unpin endpoint should verify that the authenticated user administers the company page rather than trusting a client-supplied version tag.
How it was found
- Send a request to unpin a post using a company ID and observe an unusual response code.
- Create an attacker company page and note that its version tag appears in a similar request.
- Try the attacker's version tag against the victim company and get the same error.
- Request the organisation dashboard endpoint for the victim company ID to read its version tag.
- Repeat the unpin request with the victim company ID and its version tag, receiving a 200 response.
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 write-up has not been written yet. The Original tab links to the source.
A company page on LinkedIn can pin a post to the top. The server that handles unpinning trusted two values sent by the browser: which company page, and a 'version tag' that is meant to prove the page belongs to you. The researcher found that anyone could fetch any company's version tag from another endpoint, so the check was useless and anyone could unpin any company's post.
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.