Skip to content
Crypto Write-up Advanced

How a Broken Cryptographic Key Derivation Allowed Full Tenant Tak

The identity provider derived tenant signing keys deterministically from a master seed, a sequential key ID and a timestamp rounded to the minute, so the keys were predictable. An attacker could derive another tenant's private signing key and forge tokens to take over that tenant's accounts.

T4nv1 Follow

Published on medium.com

Three weeks ago, I was looking at a high-end enterprise Identity Provider (IdP) platform on a private bug bounty program. This service handles single sign-on (SSO) and authentication for hundreds of enterprise customers.

T4nv1, on medium.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 key derivation function used a static master seed mixed with predictable values (sequential key ID and minute-rounded timestamp) instead of independent random entropy per key.

Impact

An attacker could forge identity tokens for any tenant and log in as their global administrator, gaining access to internal user directories, cloud permissions and integrated enterprise tools.

What the attacker needed

A tenant account on the IdP; victim tenant uses the IdP; ability to run local brute-force script

The fix

The company replaced deterministic key derivation with independent, hardware-isolated random key generation and swapped sequential key IDs for random UUIDv4 strings.

How it was found

  1. Rotate your own signing key and intercept the response to see the key ID format.
  2. Rotate several more times to confirm key IDs are sequential.
  3. Compare the public keys and notice the first 32 bytes of the modulus are identical.
  4. Find the victim tenant's key ID from their public OIDC discovery endpoint and estimate their timestamp from HTTP headers.
  5. Brute force the remaining derivation variables locally against the victim's public key until a match is found.
  6. Sign a forged token with the derived private key and use it to log in as the victim's global administrator.

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.

An identity provider is the service that signs users into other apps. It was creating each customer's secret signing key from a predictable recipe instead of true randomness, so someone could work out another customer's secret key and pretend to be any user of that customer.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by T4nv1

View all

113 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.