Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowOnPaper committed Feb 2, 2024
1 parent 8c37886 commit c66a920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/posts/clerk-nextjs-vulnerability.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ What get's logged?
User ID: pwned
```

Bingo. Looking through the source code, it looks like the middleware validates the `Authorization` header first and then the cookie, while `parseJwt()` does it in the opposite order. This is a big yikes. A very big one. You could essentially impersonate any user with this as long as you know their user ID, which could be public information.
Bingo. Looking through the source code, it looks like the middleware validates the `Authorization` header first and then the cookie, while `parseJwt()` does it in the opposite order. This is a big yikes. A very big one. You could essentially impersonate any user with this as long as you know their user ID, which could be public information, or change roles to escalate your privilege.

If you'd like to see the exploit in action, I have a [reproduction](https://github.com/pilcrowOnPaper/clerk-nextjs-vulnerability) available on GitHub.

Expand Down

0 comments on commit c66a920

Please sign in to comment.