Skip to content
Business logic Write-up Intermediate

An analysis of logic flaws in web-of-trust services

Web-of-trust services like Keybase verified identity by scraping tokens from external pages, but failed to account for content redistribution, filename collisions, and redirects. An attacker could claim ownership of another user's account or a domain by exploiting these logic flaws.

[email protected] (EdOverflow) Follow

Published on edoverflow.com

Web-of-trust services (WOT) such as Keybase, Onename, and Blockstack promise to verify individuals’ identities on the web. Since many applications on the web are not consistent this often leads to unintended behaviour and therefore security vulnerabilities in web-of-trust services.

EdOverflow, on edoverflow.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 services did not validate the context of the verification token, such as whether it was shared by someone else, placed in a user-controlled filename, or reached via a redirect.

Impact

An attacker could claim a victim's GitHub username or a domain, and trick users into messaging the attacker instead of the real owner.

What the attacker needed

Victim forks attacker's gist; attacker can create a username with a dot; a redirect exists from target to attacker-controlled page

The fix

The services should verify that the token is not part of a fork, restrict usernames that contain dots, and validate the final endpoint after redirects; some issues were fixed but Keybase remained vulnerable to two vectors.

How it was found

  1. The attacker requests a verification token from Keybase for the victim’s GitHub username
  2. Keybase prompts the attacker to place the verification token in a keybase.md gist
  3. The attacker creates a keybase.md gist hiding the verification token in an HTML comment
  4. The victim forks the attacker’s GitHub gist
  5. The attacker instructs Keybase to verify /<victim>/keybase.md

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.

Web-of-trust services check that you control an account elsewhere by looking for a secret code you post there. This report shows that if the service does not check carefully how that code got there, an attacker can trick it into believing they control someone else's account or a whole website.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by [email protected] (EdOverflow)

View all

3 more disclosed reports, best first.

More from Keybase

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.