Skip to content
Leaked secrets Write-up Beginner

unauthorized authentication to enterprise infrastructure that use

A live DingTalk webhook access token was hardcoded in a publicly served JavaScript file, and the token was accepted by production systems. An attacker who found it could post messages to the associated enterprise group chat, though the gateway rejected the test message on a keyword rule.

Aksoum Abderrahmane Follow

Published on medium.com

It was just another Tuesday. Coffee steaming, terminal blinking.

Aksoum Abderrahmane, on medium.com

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 a developer hardcoded a webhook access token into client-side JavaScript instead of keeping it server-side.

Impact

The token was accepted by production systems, so an attacker could likely send messages to the associated enterprise chat, although a keyword filter blocked the test message.

What the attacker needed

None

How it was found

  1. Collect JavaScript files from the target using URL archives and crawlers.
  2. Download the JavaScript files and scan them for secrets with a custom script and a browser extension.
  3. Spot a webhook URL containing an access token in a third-party integration script.
  4. Send a test POST request to the webhook with the token.
  5. Observe that the response reports a keyword mismatch rather than an invalid token, showing the token is accepted.

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 webhook is a special URL that lets one system send messages into a chat. The secret part of that URL (the token) was left inside a JavaScript file that any visitor's browser downloads, so anyone could read it. With that token a person could send messages into the company's chat as if they were the app.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.