Example advisory — layout preview. Not a real finding. Advisories are published here only after 3-stage verification and the responsible-disclosure window.
⚠ Critical Security Advisory stripe-webhook-validator · npm · 1.4.7 – 1.4.9 Published 2026-06-25 · 03:11 UTC
Advisory · CLR-2026-0142

Exposed Stripe credentials in stripe-webhook-validator

A live Stripe secret key and webhook signing secret were hardcoded in a postinstall script and distributed via npm. The package was installed approximately 1,840 times before removal.

Critical Credential Exposure Lifecycle Hook Embedded Secret Confirmed · 3-stage verified
Summary

The npm package stripe-webhook-validator versions 1.4.7 through 1.4.9 contained a live Stripe secret key (sk_live_…) and a webhook signing secret (whsec_…) hardcoded in plain text inside scripts/setup.js. Both tokens were present in the published tarball, accessible to anyone who installed or audited the package.

The package presented itself as a utility for validating Stripe webhook payloads. The embedded credentials belonged to the package author's account and were active at the time of publication. codelake detected the finding via high-entropy secret scanning within seconds of the package appearing in the npm feed.

The package was removed from the registry 4 hours and 22 minutes after publication. codelake captured and archived the tarball before removal. The author has since rotated the credentials and published a clean version 1.5.0.

Timeline
2026-06-25
03:11 UTC
Package published to npm
[email protected] appears in the npm public feed.
03:11 UTC
+00:00
Automatic detection
High-entropy secret scan flags two literals in scripts/setup.js matching Stripe key formats.
03:14 UTC
+00:03
Tarball archived
codelake captures and stores the original tarball and metadata before any removal.
03:28 UTC
+00:17
Manual verification
Researcher confirms both tokens are valid secrets, not test fixtures. Escalated to Critical.
03:41 UTC
+00:30
AI-assisted second review
AI review confirms; no benign interpretation found. All three verification stages agree.
07:33 UTC
+04:22
Package removed from registry
npm removes versions 1.4.7–1.4.9. codelake advisory published.
09:15 UTC
+06:04
Author response
Author confirms accidental inclusion, rotates both credentials, publishes clean 1.5.0.
Technical Analysis

The embedding occurred in a postinstall script (scripts/setup.js), executed automatically on npm install. The credentials were left in from a local development environment.

Both tokens were in plain text, no obfuscation. The prefix sk_live_ confirms a production key (test keys begin with sk_test_).

scripts/setup.js · lines 12 – 18⚠ leaked credentials
12// Stripe configuration — loaded on install
13const config = {
14 secretKey: "sk_live_••••••••••••••••••••••••••••••••",
15 webhookSecret: "whsec_••••••••••••••••••••••••••••••••",
16 endpoint: "https://api.stripe.com/v1",
17};
18module.exports = config;

Shannon entropy for the extracted literals measured 4.92 and 4.88 bits/character, well above the 3.80 threshold, and both matched named Stripe key regex signatures — a double confirmation with no dependence on a single signal.

Indicators of Compromise
KEYsk_live_•••••••••••••••••••••••••••••••• (Stripe secret key — now rotated)
KEYwhsec_•••••••••••••••••••••••••••••••• (webhook signing secret — now rotated)
PKG[email protected], 1.4.8, 1.4.9 (npm) — all removed
SHA9f2c3a81e4d7b506f2ca4891dce534f7a9e21b3d4c8f9a0e1b2c3d4e5f6a7b8c · stripe-webhook-validator-1.4.8.tgz
Remediation
#ActionPriority
01Rotate credentials immediately. Revoke the exposed keys in the Stripe dashboard; issue new restricted keys.Immediate
02Audit Stripe API logs for the exposure window (00:00 – 07:33 UTC) for unexpected charges, refunds or data reads.Immediate
03Remove versions 1.4.7 – 1.4.9 from all environments and CI. Update to 1.5.0 or the official stripe library.High
04Scan your dependency tree for other packages carrying credentials.High

Discovered and verified by codelake Research · automated detection · manual researcher review · AI-assisted second review · all three stages confirmed · OSV-compatible format.

The original tarball is preserved in the codelake Research archive and available to verified security researchers on request.