Obtaining Wildcard SSL Certificates from Comodo via Dangling Markup Injection
Comodo's certificate issuance system failed to escape HTML in the Company Name field, allowing an attacker to inject a form that leaks the domain validation code when a victim clicks a button in the confirmation email. An attacker could then use the leaked code to obtain a valid SSL/TLS certificate for the victim's domain and intercept their traffic.
thehackerblog.com
Published on thehackerblog.com
I recently decided to investigate the security of various certificate authority’s online certificate issuing systems. These online issuers allow certificate authorities to verify that someone owns a specific domain, such as thehackerblog.com and get a signed certificate so they can enable SSL/TLS on their domain.
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 application did not escape user-supplied HTML in the Company Name field before embedding it in the confirmation email.
What the attacker needed
Attacker requests a certificate for victim's domain; victim receives and clicks the crafted email button
The fix
The vulnerability was fixed by Comodo after the report.
How it was found
- Request a free 30-day trial certificate from PositiveSSL (Comodo) for a domain.
- Generate a certificate signing request (CSR) and paste it into the web form.
- Fill in the Corporate Details form, setting the Company Name to HTML that opens a form and an unclosed textarea.
- Submit the form and receive the confirmation email, which contains the injected HTML and the validation code.
- The victim receives the redressed email and clicks the button, which submits the form to the attacker's site, leaking the validation code.
- Use the leaked code to download the issued certificate from the Comodo account.
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 request an SSL certificate, the certificate authority sends an email to verify you own the domain. This email contains a secret code. The report found that a field in the request form was not cleaned, so an attacker could put HTML code there that changes the email and tricks the recipient into sending the secret code to the attacker. With that code, the attacker can get a certificate for someone else's website and spy on their visitors.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.