Attackers use scheme squatting by registering a custom URI scheme that resembles a legitimate one, then intercepting links intended for another app. That can steal authentication codes, redirect users, or capture sensitive parameters. Defenders should prefer verified app links where available, inspect registered schemes carefully, and avoid placing secrets in unprotected custom-link flows.
How scheme squatting works as an attack path
scheme squatting succeeds because many operating systems and apps rely on custom URI schemes to hand off a link to the registered handler. An attacker can register a lookalike scheme, then wait for a user to click a crafted link, or for a vulnerable flow to redirect into the wrong app. The abuse happens at the handoff point, where trust is assumed but not verified.
It is especially effective when the scheme is used in login, payment, invitation, or deep-link flows. If the app accepts sensitive parameters through the URI, the attacker may receive authorization codes, tokens, or other data before the user notices anything unusual. The issue is not the link alone, but the reliance on an untrusted scheme registration and an unauthenticated redirect target.
Well-designed applications reduce this exposure by preferring verified app links or universal links where the platform supports them, because those mechanisms bind the destination to a domain rather than just a local scheme name. When custom schemes remain necessary, the flow should be treated as hostile input and the receiving app should validate the source, destination, and parameters before acting on them.
Why scheme squatting becomes a credential and session risk
Custom-link flows often carry secrets because they are used to complete a user action in one step. That creates a narrow but high-value interception point: if the wrong app receives the callback, the attacker may capture one-time codes, session handoff data, or recovery links. Even when the stolen data is short-lived, it can be enough to complete account takeover or pivot into a broader session compromise.
Attackers also benefit from user confusion. A convincing scheme name can make a malicious app appear to be the expected handler, and the user may not realize that the operating system has no strong visual guarantee that the right application opened. That makes scheme squatting a practical phishing-adjacent technique, but one that exploits platform registration and link resolution rather than email or web content.
In mobile environments, Mobile App Security Guide is the most relevant internal starting point because it covers deep link hijacking, intent spoofing, OAuth PKCE, and related app-hand-off controls. For breach context and the kinds of downstream secrets attackers typically seek, The State of NHI & AI Agent Breach Report 2026 helps connect link abuse to token theft, stolen credentials, and lateral movement patterns.
How defenders reduce the impact of squatting attempts
The most important control is to avoid placing sensitive material directly into an unprotected custom-link callback. If the flow must return a result through a URI, keep the payload minimal, time-bound, and useless on its own. Where possible, use verified app links, domain-bound callbacks, or an intermediary page that can enforce additional checks before handing control to the app.
Defenders should also inventory which schemes are actually registered on target platforms and review them as part of release and security testing. A scheme that looks harmless in development can become dangerous once a competing app, SDK, or test tool registers a similar handler on a user device. This is why mobile hardening and link-handling tests need to be part of the release process, not an afterthought.
For broader threat context, CISA cyber threat advisories is useful when you want to track current abuse patterns and defensive guidance across active attack campaigns. MITRE ATT&CK Enterprise Matrix also provides a practical lens for mapping scheme squatting to credential access and user execution pathways, while OWASP API Security Top 10 is relevant when the intercepted redirect exposes API-driven authorization or object access decisions.
Risk and Threat Considerations
Scheme squatting is risky because the attack succeeds before many application-layer defenses get a chance to run. The trust break happens at the platform handoff, so a user can be redirected into a malicious app even when the original web or mobile application looks legitimate.
Failure mechanism: The attacker registers a lookalike custom scheme or competing handler, then captures the link resolution step and receives the callback or parameters intended for the legitimate application.
Impact: Sensitive parameters, authorization material, or session handoff data can be exposed, which can enable account takeover, transaction abuse, or further phishing and replay attempts.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP API Security Top 10 addresses the attack and risk surface, while OWASP ASVS, NIST SP 800-63, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V10 — OAuth and OIDC | Custom-link callbacks often complete OAuth-style authorization flows. |
| Recommendation — Use verified redirect handling and tighten callback validation for auth flows. | ||
| NIST SP 800-63 | Digital Identity Guidelines | Scheme squatting can steal authorization codes and break phishing-resistant handoffs. |
| Recommendation — Prefer phishing-resistant and domain-bound identity flows over custom-link callbacks. | ||
| OWASP API Security Top 10 | API2 — Broken Authentication | Stolen callback material can expose or bypass API authentication steps. |
| Recommendation — Bind callback handling to strong authentication and reject untrusted redirect input. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | The attack targets short-lived secrets and handoff material that must be protected. |
| Recommendation — Minimize secret exposure in redirect flows and rotate any exposed authenticators. | ||
| CIS Controls v8 | CIS-6 — Access Control Management | Defenders need to restrict and review which handlers and app links are trusted. |
| Recommendation — Review and restrict allowed handlers, redirects, and application trust paths. | ||
Practitioner Guidance
What to verify: Test every login, reset, invite, and payment handoff path on real devices and confirm which app or process actually receives the callback. If the flow can be satisfied by a verified app link, treat a custom scheme as a fallback only.
Common mistake: Teams often assume that obscuring the scheme name is enough. It is not, because the main failure is uncontrolled registration and weak trust at redirect time, not the cosmetic name itself.
Decision rule: If the URI can carry a code, token, or other secret, redesign the flow so that the callback is non-sensitive or disposable. If the sensitive material must exist, shorten its lifetime and require an additional validation step before it can be used.
Practitioner takeaway: Scheme squatting is best treated as a link-handling trust failure, so the real defense is to remove sensitive data from the handoff path and bind the destination to something stronger than a scheme name.
Related resources from NHI Mgmt Group
- How do attackers use the North Korean IT worker scheme?
- Why do passwords remain dangerous when attackers use AI to find vulnerabilities?
- How should security teams reduce fraud when attackers use deepfakes and synthetic identities?
- How should security teams handle exposed cloud keys before attackers use them?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 19, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org