# Critical Payment Credential Exposure in ISP JavaScript Bundle
A client-side JavaScript bundle exposed payment gateway credentials, a JWT with elevated privileges, and the JWT signing key. An attacker could extract these secrets and forge administrative tokens to potentially process fraudulent transactions.
medium.com
Published on medium.com
During a security assessment of a major Nepali internet service provider, EncryptSec discovered that a client-side JavaScript bundle was exposing complete payment gateway credentials, JWT authentication tokens with elevated privileges, and cryptographic signing keys. This vulnerability allows any unauthenticated…
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 build process bundled server-side secrets into client-side JavaScript, violating the trust boundary between server and client.
Impact
An attacker could forge administrative tokens and potentially process fraudulent transactions, leading to financial fraud and data theft.
What the attacker needed
None
The fix
The report recommends removing all secrets from client-side bundles, rotating exposed credentials, invalidating existing JWT tokens, and moving payment configuration to server-side vaults.
How it was found
- Attacker visits the website and loads the JavaScript bundle
- Payment keys, merchant IDs, and JWT signing key are extracted from the bundle
- Using the exposed signing key, attacker creates a JWT with administrative privileges
- Forged token is presented to payment APIs
- Unauthorized transactions, payment interception, or complete payment system compromise
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 website's JavaScript file, which runs in your browser, accidentally contained secret passwords and keys for payment systems. Anyone could download this file and see the secrets, then use them to pretend to be an administrator and possibly steal money.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.