Live newsletter API key published in the website code
shop.admin-soehne.example · /assets/app.js · email marketing service
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Description
The agents flagged a key in a JavaScript file of the shop. The tester confirmed by hand that it is the live key of the email marketing service. It can read the subscriber list and send mailings to it.
Steps to reproduce
- Load the shop’s public JavaScript file that the agents flagged.
- Find the key the agents reported in it.
- Check the key’s rights with the client’s admin: it can read the subscriber list and send mailings.
Agent flag: key found in /assets/app.js of the shop (shortened)
Tester check: live key of the email marketing service
Key rights: read subscriber list = yes · send mailings = yes Business impact
Anyone can send a phishing mail to all subscribers from your real sender address, and read their names and email addresses. Reputation damage and a GDPR incident in one, though no order or payment data is exposed.
Remediation
Revoke the key and issue a new one that stays on the server. Send sign-ups to the marketing service through your own backend. Keep the agents’ secret check running on every release.
OWASP Top 10 2021: A05 Security Misconfiguration · CWE-798 (Use of Hard-coded Credentials) · CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)