Home / Companies / WorkOS / Blog / Post Details
Content Deep Dive

Token replay attacks: What they are, why MFA won't save you, and how to defend against them

Blog post from WorkOS

Post Details
Company
Date Published
Author
Maria Paktiti
Word Count
1,715
Language
English
Hacker News Points
-
Summary

The focus of the security industry has shifted from merely protecting credentials to addressing the vulnerabilities posed by token replay attacks, where attackers intercept and reuse valid tokens to impersonate legitimate users without needing passwords or MFA challenges. These attacks bypass traditional security measures like SSO and MFA, as they occur after successful authentication. The text illustrates how token replay attacks are executed by capturing tokens via network interception, malware, compromised third-party integrations, or log exposure, and then reusing these tokens to access systems and data. It emphasizes the importance of implementing a layered defense strategy, including short token lifetimes, refresh token rotation, sender-constrained tokens with Demonstrating Proof-of-Possession (DPoP), enforcing Proof Key for Code Exchange (PKCE), binding tokens to contextual signals, and deploying behavioral detection to mitigate such attacks. The piece further advises developers to audit token storage, enforce short-lived access tokens, rotate refresh tokens, adopt DPoP, require PKCE, monitor for anomalies, and manage third-party integrations as essential practices in safeguarding against token replay attacks, asserting that these measures should be integral to the security posture of any organization using OAuth for authentication and authorization.