Security lab
JWT Refresh Token Confusion
The API uses refresh tokens as bearer tokens across multiple principals but does not bind them to a specific user or role. An attacker can swap a user refresh token into an admin session and receive the privileged access token.
Lab objective
Submit a refresh token for the wrong user or role and exploit the missing token-to-principal binding to mint an admin access token.
Tools you will use
- browser
- Burp Suite
- curl
What this lab teaches
This lab is a self-contained exercise hosted in an isolated, per-user sandbox. You are given a clear objective, the tools typically used for the technique, and a guided set of hints. Because every sandbox is disposable and network-isolated, you can experiment freely, make mistakes, and reset the environment without affecting any real system.
Hints & approach
- 01Refresh tokens are accepted without checking the session identity, only by looking at the token string.
- 02A user token and an admin token may both be accepted by the same exchange endpoint.
- 03Swap the token value and inspect the resulting role and access token returned by the server.
How the sandbox works
When you start the lab, Vulnarex provisions an isolated, per-user environment and opens it in a new tab. Each session has its own target and state, so nothing you do here can affect another learner or any external system. You can reset the environment at any time and re-approach the challenge from a clean slate.