ACME and Let’s Encrypt
The ACME TLS-SNI-01 challenge allowed an attacker to obtain a certificate for a domain they did not control by exploiting shared hosting providers that did not verify domain ownership before allowing a domain to be added. An attacker could add a domain like 'acme.invalid' to their account and serve a self-signed certificate with the challenge, causing Let's Encrypt to issue a certificate for the victim's domain.
labs.detectify.com
Published on labs.detectify.com
(If you know how ACME and Let’s Encrypt works, you can skip to the next chapter.)
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
The TLS-SNI-01 challenge only validated that the requested domain resolved to an IP that served a certificate containing the challenge, without verifying that the requester controlled the domain, and shared hosting providers allowed adding arbitrary domains without ownership verification.
What the attacker needed
Target domain hosted on vulnerable shared hosting; ability to add domains to the shared hosting account; no ownership verification by the provider
The fix
Let's Encrypt disabled TLS-SNI-01 and TLS-SNI-02, and shared hosting providers like Heroku and AWS CloudFront now block the .invalid TLD from being added.
How it was found
- Add the target domain to a shared hosting account (e.g., Heroku or CloudFront) without ownership verification.
- Request a TLS-SNI-01 challenge from Let's Encrypt for the target domain.
- Create a self-signed certificate with the challenge value in the SAN and upload it to the shared hosting provider.
- Let's Encrypt connects to the domain on port 443, sees the challenge certificate, and issues the certificate.
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.
When you want a free SSL certificate from Let's Encrypt, you have to prove you control the domain. One way was to create a special certificate with a random value and serve it on port 443. But shared hosting providers like Heroku and CloudFront let anyone add any domain to their account without checking ownership. So an attacker could add a domain like 'something.acme.invalid' to their account, serve the special certificate, and Let's Encrypt would issue a certificate for the victim's domain because it only checked the certificate, not who owned the domain.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.