Infrastructure Takeover: How Leaked MailWizz API Keys Allowed Byp
Hardcoded MailWizz API credentials were found in production config files, allowing an unauthenticated attacker to send authenticated corporate emails through the official mail servers. This could enable high-fidelity phishing that bypasses SPF, DKIM, and DMARC.
Published on medium.com
During an authorized security assessment, a critical infrastructure information disclosure vulnerability was validated. The flaw involves the exposure of hardcoded production API credentials for the MailWizz transactional email engine.
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, production API credentials were hardcoded in configuration files instead of being stored securely, and the transactional email endpoint did not require additional authentication.
Impact
An attacker could send phishing emails from the company's legitimate infrastructure that pass SPF, DKIM, and DMARC checks, potentially leading to credential theft or malware delivery, and could also damage domain reputation or cause resource exhaustion.
What the attacker needed
Access to source code or config files; no authentication needed
The fix
The leaked API keys should be revoked, moved to environment variables outside the web root, and restricted by IP whitelisting.
How it was found
- Discover hardcoded MailWizz API credentials in production config files.
- Build a script using the official MailWizz SDK with the leaked credentials.
- Test the standard subscriber endpoint and find no records.
- Pivot to the transactional email endpoint.
- Send a test email to a controlled address and receive a success response with a tracking UID.
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.
API keys are like passwords that let programs talk to services. Here, these keys were left in the code, so anyone who found them could use the company's email system to send messages that look fully legitimate. That makes phishing emails much harder to spot because they really do come from the company's own mail servers.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.