Skip to content
Access control Write-up Intermediate

How I Found a Broken Access Control in a Job Application API

The job application API trusted user-controlled email fields in both the JWT payload and the request body, allowing an attacker to spoof another user's email and submit applications on their behalf. The platform even sent a confirmation email to the spoofed address, proving the impersonation.

medium.com

Published on medium.com

When testing job application platforms, one of the first things I usually think about is:

Amrgomaa, on 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.

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 backend trusted user-controlled email fields in both the JWT payload and the request body instead of deriving identity solely from the authenticated session.

Impact

An attacker could apply to jobs on behalf of other people, impersonate candidates, and undermine the integrity of the hiring process.

What the attacker needed

A registered account on the platform; ability to intercept and modify requests

The fix

The backend should enforce identity strictly based on the authenticated session and not trust user-controlled email fields in the JWT payload or request body.

How it was found

  1. Log into the platform and click Apply on a job.
  2. Intercept the request and replace the email field in the JSON body with another email.
  3. Observe a 400 Bad Request error saying the email does not match.
  4. Decode the JWT and notice the email appears in two separate fields.
  5. Modify both email fields inside the JWT payload and update the JSON body email to match.
  6. Send the request and observe a 201 Created response, with a confirmation email sent to the spoofed address.

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 job application API is supposed to check who you are from your login token, not from data you send. Here, the server believed an email address that the attacker typed into the request and into the token, so the attacker could pretend to be someone else and apply for jobs as them.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.