Challenge

A store gated by a JWT. The name gives away the bug, and I recognized it on sight since I have given a HackPack talk on this exact attack.

Approach

The verifier honored the none algorithm. A JWT with "alg":"none" carries no signature, and a server that trusts it will accept whatever claims you put in the payload. The Burp JWT Editor extension makes this a few clicks. Set the header algorithm to none, edit the payload, and strip the signature.

Solution

Forge a token with the algorithm set to none and the claims rewritten in your favor, then drive the purchase flow with a quantity of -1 so the balance math works out and the flag item is granted.

Flag

MetaCTF{JWT_N0n3_4lg_3xpl01t}