appsec.fyi

Authentication — A Practical Guide

A curated AppSec resource library covering XSS, SQLi, SSRF, IDOR, RCE, XXE, OSINT, and more.

Authentication: A Practical Guide

Curated and synthesized by . Last updated 2026-09-01. Synthesized from 223 of 223 curated resources. Browse all 223 Authentication resources →

Problem Framing

Authentication, at its core, is the process of verifying the identity of a user or system attempting to access resources. In modern application security, this seemingly straightforward task has evolved into a complex landscape fraught with subtle vulnerabilities and sophisticated attack vectors. The proliferation of distributed systems, cloud-native architectures, mobile applications, and the increasing reliance on third-party services means that the traditional perimeter has dissolved, placing authentication mechanisms under immense scrutiny. Attackers continually probe these mechanisms, seeking weaknesses in protocol implementations, configuration oversights, and human factors to gain unauthorized access. Understanding these attack surfaces is paramount for any practitioner focused on building and securing applications.

Core Mechanics

The foundational principles of authentication revolve around proving identity. This is typically achieved through one or more factors: something you know (passwords, PINs), something you have (a physical token, a registered device), or something you are (biometrics) [1]. Modern systems often combine these into Multi-Factor Authentication (MFA) to enhance security [2].

Protocols like SAML (Security Assertion Markup Language) and OAuth 2.0, along with its identity layer OpenID Connect (OIDC), are central to federated identity and single sign-on (SSO) capabilities [3][4][5][6]. SAML facilitates secure exchange of authentication and authorization data between an Identity Provider (IdP) and a Service Provider (SP) [6]. OAuth 2.0, on the other hand, is primarily an authorization framework that allows third-party applications to access user resources on behalf of a user, without exposing the user's credentials directly [5][7]. OIDC builds on OAuth 2.0 to provide user authentication and basic profile information.

JSON Web Tokens (JWTs) are a common mechanism for securely transmitting information between parties as a JSON object. They are frequently used in stateless authentication systems, where the server does not need to maintain session state for each authenticated user. JWTs consist of a header, a payload containing claims, and a signature used to verify the sender's identity and ensure the message hasn't been tampered with [8].

Credential management is a critical aspect of authentication. This includes secure storage of secrets, such as API keys and service account credentials, and implementing robust password policies, including strong hashing algorithms like Argon2id or bcrypt for stored passwords [9]. For non-human identities, such as service accounts and API keys, secure storage and lifecycle management are equally vital to prevent exploitation [10].

Notable Techniques and Vulnerabilities

The landscape of authentication vulnerabilities is vast and constantly evolving. Many attacks exploit fundamental protocol weaknesses or common misconfigurations.

SAML Vulnerabilities

XML Signature Wrapping (XSW) is a persistent attack vector against SAML. Attackers can craft SAML assertions where multiple signatures exist, causing the Service Provider to validate one signature while processing a different assertion element for authentication [11][12][13][3]. Parser differentials between different XML parsing libraries can also lead to bypasses, where one parser validates an assertion correctly, while another allows for arbitrary modifications [14][12]. For example, CVE-2026-8452 in Citrix NetScaler involved a heap overflow related to SAML message parsing [15]. Improper signature validation is a recurring theme, as seen in CVE-2025-59718 affecting FortiGate SAML SSO [16][17]. Forged SAML tokens, often referred to as "Golden SAML," are possible if an attacker obtains the signing certificate used by the IdP, allowing them to impersonate any user [18]. Keycloak has seen vulnerabilities where encrypted assertions were not properly validated, leading to bypasses [19].

OAuth 2.0 and OpenID Connect Exploits

OAuth 2.0 is prone to several vulnerabilities, often stemming from redirect URI validation failures. Open redirects in the redirect_uri parameter can be used to trick users into authorizing malicious applications, leading to token theft [20][7][21]. Techniques like IDN homograph attacks can exploit subtle differences in Unicode characters to register lookalike domains for malicious redirects [22]. Insecure Dynamic Client Registration (DCR) and missing redirect URI validation on MCP servers have led to one-click account takeovers [23]. OAuth parameter injection can also be exploited to manipulate scopes, redirect URIs, and other parameters [7]. The device authorization grant (RFC 8628), while useful for input-constrained devices, can be abused for token theft and persistence if not properly secured [24]. Explicitly, the "client controlled metadata" and "no auth enforcement" aspects of server-side authorization failures can lead to bypasses [24].

MFA Bypass Techniques

Despite the widespread adoption of MFA, numerous bypass techniques exist. Adversary-in-the-Middle (AiTM) attacks, often facilitated by sophisticated phishing-as-a-service (PhaaS) kits, use reverse proxies to capture both credentials and session tokens, effectively bypassing MFA because the captured token acts as a bearer credential [10][22]. Social engineering for One-Time Passwords (OTPs) or MFA approval prompts is also common [25]. Other methods include brute-forcing OTP codes, exploiting flawed recovery flows (password reset, email change), and using CSRF to disable MFA [26][27]. Reusable or improperly tied MFA tokens can also be a weakness [28]. Authentication downgrade attacks, where an IdP response is manipulated to force a fallback to weaker authentication methods (e.g., bypassing FIDO2/WebAuthn) are also a concern [29].

JWT Vulnerabilities

JWTs are susceptible to several attacks, including the alg:none vulnerability where an attacker can remove the signature, causing some implementations to accept the token without verification [4][18]. Signature bypasses can occur if the server incorrectly validates the signature, for instance, by using an RSA public key to verify a JWT signed with a symmetric algorithm like HS256 [19][30]. JWTs being inherently stateless present a challenge for revocation; if a token is leaked or a user's permissions change, the token remains valid until its expiration unless custom revocation mechanisms are implemented [31]. Storing JWTs in client-side localStorage makes them vulnerable to Cross-Site Scripting (XSS) attacks [32][31].

Credential Theft and Reuse

Credential sprawl on developer endpoints represents a significant security risk, as stolen credentials can be reused across multiple systems [24]. Malware and browser extensions can extract tokens from browser storage, including localStorage, sessionStorage, and cookies, enabling session hijacking [10]. This includes stealing access tokens from desktop applications like Microsoft Teams [10]. AI agents have been observed breaching systems by reusing stolen credentials and exploiting injection flaws [24].

Other Notable Techniques

Detection and Prevention

Effective detection and prevention strategies require a multi-layered approach, combining technical controls with vigilant monitoring and secure development practices.

Secure Protocol Implementation

MFA Implementation and Hardening

Secure Credential Management

Access Control and Session Management

Secure Development Practices

Tooling

A variety of tools can aid in the detection, prevention, and analysis of authentication vulnerabilities.

Network and Reconnaissance Tools

Authentication Protocol Analysis and Exploitation

Credential and Active Directory Attack Tools

General Security Testing and Analysis

AI-Assisted Security Research

Recent Developments

The authentication landscape is dynamic, with ongoing developments and emerging threats.

Where to Go Deeper

For practitioners seeking to deepen their understanding and capabilities in authentication security, the following areas and resources are recommended:

Sources cited in this guide

  1. WebAuthn: Complete Guide to Passwordless, FIDO2, Passkeys (TerraZone) — terrazone.io
  2. CISA adds single-factor authentication to its catalog of 'Bad Practices' — therecord.media
  3. Common SAML vulnerabilities and how to remediate them — snyk.io
  4. SSO Protocol Security: Critical Vulnerabilities in SAML, OAuth, OIDC, JWT (2025) — guptadeepak.com
  5. An Illustrated Guide to OAuth and OpenID Connect — developer.okta.com
  6. Understanding SAML — developer.okta.com
  7. OAuth 2.0 Common Security Flaws and Prevention (APIsec) — apisec.ai
  8. Using JWTs in Python Flask REST Framework | AppSignal Blog — blog.appsignal.com
  9. Critical SQL Injection in Metabase via Password Reset: CVE-2026-72898 — bishopfox.com
  10. Token-Based Attacks: How Attackers Bypass MFA — obsidiansecurity.com
  11. IBM: What is XML Signature Wrapping? — ibm.com
  12. SAML rough quarter: Five critical vulnerabilities in four months — workos.com
  13. CVE-2025-47949: samlify SAML SSO bypass — endorlabs.com
  14. Sign in as anyone: Bypassing SAML SSO authentication with parser differentials — github.blog
  15. No Crash Required: Verifying the Citrix NetScaler SAML Patch for CVE-2026-8452 — bishopfox.com
  16. Fortinet FortiGate SAML SSO Bypass Active Attack — thehackernews.com
  17. CVE-2025-59718: FortiCloud SSO Authentication Bypass — picussecurity.com
  18. SSO Bypass: How Attackers Circumvent Single Sign-On (Obsidian) — obsidiansecurity.com
  19. CVE-2026-2092: Keycloak Auth Bypass Vulnerability — sentinelone.com
  20. What can I do with Open Redirect with OAuth? — flex0geek.blogspot.com
  21. Hacking OAuth Applications — speakerdeck.com
  22. Cisco Talos: State-of-the-art phishing — MFA bypass — blog.talosintelligence.com
  23. Hunting Account Takeovers in the Wild West of MCP OAuth Servers" — blog.sicks3c.io
  24. AI Agent Authentication in 2026: Web Bot Auth, ARD & OAuth — webdecoy.com
  25. Navigating the New Wave of MFA Bypass Attacks in 2025 — netrixglobal.com
  26. Two-Factor Authentication (2FA): Bypass Scenarios (DeepStrike) — deepstrike.io
  27. Bug-Bounty-Methodology: 2FA testing — github.com
  28. Broken authentication: 7 Advanced ways of bypassing 2-FA (Intigriti) — intigriti.com
  29. IOActive: Authentication Downgrade / MFA Bypass — ioactive.com
  30. OAuth SSO WordPress Plugin JWT Bypass (CVE-2025-9485) — zeropath.com
  31. These are the security issues with JWT — scip.ch
  32. Introducing CookieMonster: a tool for breaking stateless authentication — ian.sh
  33. Why Protocol Matters: Evil PWA Attack on Casdoor — blog.slonser.info
  34. The Danger of Multi-SSO AWS Cognito User Pools — blog.doyensec.com
  35. How I AES-Roasted My Active Directory Lab (And How to Fix It) — infosecwriteups.com
  36. AWS Console Session Traceability: How Attackers Obfuscate Identity Through the AWS Console — wiz.io
  37. CVE-2026-34457 Detail (OAuth2 Proxy) - NVD — nvd.nist.gov
  38. OAuth2-Proxy Authentication Bypass (CVE-2025-54576) — zeropath.com
  39. Automate your API hacking with Autorize — danaepp.com
  40. Hacking SAML with Claude Code — oblique.security
  41. Identity Abuse Through Trusted Communication Channels — unit42.paloaltonetworks.com
  42. Avoiding mistakes with AWS OIDC integration conditions — wiz.io
  43. From Compromised Keys to Phishing Campaigns: Inside a Cloud Email Service Takeover — wiz.io
  44. ServiceNow's Virtual Agent Vulnerability Shows Why AI Security Needs Traditional AppSec Foundations — snyk.io
  45. The many ways to obtain credentials in AWS — wiz.io
📚 This guide is synthesized from the full text of resources curated in the Authentication library, and refreshed as new material is added.