Skip to content
Access control Write-up Beginner

When Certificates Fail: A Story of Bypassed MFA in Remote Access

The remote access system used mTLS to pre-fill the username from the client certificate but did not verify that the authenticated user matched the certificate's identity. An attacker with any valid certificate could edit the username field and log in as another user with just their password, bypassing MFA.

Michael Eder Follow

Published on edermi.github.io

Long time no see! After 3 years of no new blog posts and also no conference talks from my side, I decided it’s time to write again.

Michael Eder, on edermi.github.io

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 trusted the username extracted from the client certificate for pre-filling the login form but failed to verify that the user completing authentication was the same identity as the certificate subject.

Impact

An attacker with any valid certificate could bypass MFA and authenticate as any user whose password they know, making phishing and credential stuffing effective again.

What the attacker needed

Valid client certificate issued by the company; knowledge of the target user's password; ability to edit HTML form in browser

The fix

The customer implemented a fix so that the application ensures the same user that authenticates via mTLS also authenticates on the application.

How it was found

  1. Obtain a valid client certificate issued by the company (e.g., a computer certificate with exportable private key).
  2. Connect to the Citrix endpoint with the certificate to establish mTLS.
  3. Use browser developer tools to remove the disabled attribute from the username field.
  4. Change the username to the target user and enter their password to log in.

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.

Multi-factor authentication (MFA) normally requires a password plus a one-time code. Here, the system used a client certificate as the second factor, but it only used the certificate to fill in the username and never checked that the person logging in was the same as the certificate owner. So anyone with any valid certificate could change the username and log in with just a password.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.