Skip to content
Misconfiguration Write-up Intermediate

The story of EV-SSL, AWS and trailing dot domains

AWS CloudFront and S3 did not check for conflicts between regular domains and trailing dot domains, allowing anyone to claim a trailing dot version of a domain already in use. An attacker could then serve their own content on that trailing dot domain, and because browsers treat it as a different origin, they would not send cookies, but EV-SSL certificates would still be considered valid, enabling phishing and man-in-the-middle attacks.

labs.detectify.com

Published on labs.detectify.com

When it comes to Amazon Web Services (AWS), both S3 and CloudFront lack domain validation. If a domain has a DNS entry pointing to either S3 or CloudFront but the domain is not actually claimed in S3 or CloudFront, it’s possible for anyone to claim the domain and serve their own content on the domain using these two…

The author, on labs.detectify.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 the cloud provider's domain conflict check did not normalise trailing dot domains, so it treated 'example.com.' as distinct from 'example.com' and allowed claiming it without verification.

Impact

An attacker could serve their own content on a trailing dot domain that appears legitimate, potentially phishing users or intercepting traffic, though browsers' Same-Origin Policy prevents cookie theft; AWS fixed the issue by redirecting trailing dot domains to the regular domain.

What the attacker needed

AWS account; EV-SSL certificate for target domain; victim clicks a link with trailing dot

How it was found

  1. Set up a CloudFront distribution with an EV-SSL certificate for the target domain.
  2. Intercept the request to add an alternate domain name and modify it to include a trailing dot.
  3. Configure the distribution's origin to point to the legitimate site.
  4. Enable logging to capture requests and cookies sent to the trailing dot domain.
  5. Users are directed to the trailing dot domain (e.g., via links in emails) and the attacker can MITM or log traffic.

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 trailing dot domain is the same domain name but with a dot at the end, which technically means the root of the DNS. Cloud services like AWS CloudFront did not treat it as the same as the version without the dot, so someone else could claim it. Browsers also treat them as different websites, so cookies are not shared, but the SSL certificate still works, which can trick users.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.