# Ability to DOS any organization's SSO and open up the door to account takeovers

Attacker registers a SAML entityId identical to a victim org's except for a trailing space, causing victim users to authenticate against their own IdP but be provisioned into the attacker's org, enabling SSO DoS and account takeover.

- Payout: $10,500
- Severity: high
- Program: Superhuman (formerly Grammarly)
- Found by: cache-money
- Disclosed: 2021-04-15
- Write-up quality: 8/10
- Original: https://hackerone.com/reports/976603
- Library page: https://bugbountylibrary.com/r/h1%3A976603
- Tags: area:web domain:web impact:ato impact:dos kind:bounty platform:hackerone sev:high tech:saml tech:sso technique:parser-differential vuln:access-control vuln:account-takeover vuln:auth-bypass

**Target:** SAML SSO integration / entityId (Identity Provider Issuer) matching on www.grammarly.com
**Root cause:** SAML Response issuer is validated against a trimmed entityId, but the org-provisioning lookup uses the untrimmed entityId and prioritizes the attacker's space-suffixed entity, so authentication and provisioning resolve to different organizations.
**Steps:**
1. Set up SSO for org A with entityId `myentity` and confirm login works.
2. Create a new business account/org B with entityId `myentity ` (trailing space) and a different keypair.
3. Wait ~2 minutes for propagation, then attempt login to org A; login now errors (DoS).
4. Delete the user from org A and retry login: SAML Response signed with org A's key is accepted, but user is provisioned into org B.
5. Attacker changes org B entityId to a new value and logs into the victim's account using their own keypair; converted personal accounts expose personal documents.
**How found:** Researcher spent days probing SSO org-assignment logic and noticed authentication and provisioning resolved to different orgs; hypothesized a normalization mismatch and tested a trailing-space entityId to confirm trim-vs-untrimmed divergence.
**Exploitation:** Attacker creates a competing org whose entityId differs from the victim's only by a trailing space. Victim users authenticate against their legitimate IdP (signature validated against trimmed issuer) but the provisioning logic matches the space-suffixed entity first, placing them in the attacker's org. Attacker then rotates their entityId and uses their own keypair to log in as the victim, taking over the account and accessing personal documents.
**Escalation:** From SSO DoS to cross-org user provisioning to full account takeover of converted personal accounts and access to personal documents.
**Insight:** When SAML/OIDC issuer or entityId is compared in one place and used as a lookup key elsewhere, test normalization differentials (trailing spaces, case, unicode) to make auth and provisioning resolve to different tenants.

