Dear Prime Minister Ambani,
Please accept my humble apologies for not realizing that you are the real boss of India.
Naturally, you would prefer to maintain your monopolistic exploitation of the great people of India, but would you nonetheless consider allowing Starlink to compete?
There are many areas of India, as there are in all countries, with no Internet access, which denies children the opportunity for education and for small businesses the opportunity to sell their goods to a global market. Starlink would change their lives for the better.
Thank you ๐
The vulnerability is an Algorithm Confusion / Key Confusion attack.
The server verifies JWTs like this:
jwt.verify(token, KEY)
But it never restricts allowed algorithms.
That means an attacker can:
- Change alg from RS256 โ HS256
- Use the PUBLIC key as the HMAC secret
- Forge arbitrary tokens like:
{ "role": "admin" }
Impact:
- Full auth bypass
- Privilege escalation
- Account takeover
- Admin access without private key compromise
Fix:
jwt.verify(token, KEY, { algorithms: ["RS256"] })