{
  "id": "security/oauth2-token-replay-detected",
  "signature": "OAuth2 token replay detected: the same access token was used from two different IP addresses within a short time window",
  "signature_zh": "检测到OAuth2令牌重放：在短时间内从两个不同的IP地址使用了相同的访问令牌",
  "regex": "OAuth2 token replay detected: the same access token was used from two different IP addresses within a short time window",
  "domain": "security",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "An attacker has stolen a valid access token and is using it from a different IP address, or a legitimate user's token is being used from multiple locations due to a misconfigured proxy or VPN.",
  "root_cause_type": "generic",
  "root_cause_zh": "攻击者窃取了有效的访问令牌并从不同的IP地址使用它，或者合法用户的令牌因代理或VPN配置错误而从多个位置使用。",
  "versions": [
    {
      "version": "Keycloak 22.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Okta 16.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Auth0 3.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Spring Security OAuth2 6.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Blocking the IP address of the second request is ineffective because attackers often use rotating IP addresses or proxies, and it may also block legitimate users behind NAT.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Increasing the time window for replay detection may reduce false positives but also gives attackers more time to use the stolen token, increasing the risk.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling replay detection entirely removes the security control, leaving the system vulnerable to token theft and replay attacks.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Implement token binding by issuing tokens that are bound to the client's TLS session or device fingerprint. For example, use JWT 'cnf' claim with a certificate thumbprint.",
      "success_rate": 0.8,
      "how": "Implement token binding by issuing tokens that are bound to the client's TLS session or device fingerprint. For example, use JWT 'cnf' claim with a certificate thumbprint.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use short-lived access tokens (e.g., 5 minutes) and refresh tokens with rotation to minimize the window for replay attacks. Configure your identity provider accordingly.",
      "success_rate": 0.85,
      "how": "Use short-lived access tokens (e.g., 5 minutes) and refresh tokens with rotation to minimize the window for replay attacks. Configure your identity provider accordingly.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Monitor and alert on suspicious token usage patterns, such as rapid IP changes, and automatically revoke the token and require re-authentication.",
      "success_rate": 0.7,
      "how": "Monitor and alert on suspicious token usage patterns, such as rapid IP changes, and automatically revoke the token and require re-authentication.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "通过将令牌绑定到客户端的TLS会话或设备指纹来实现令牌绑定。例如，使用带有证书指纹的JWT 'cnf'声明。",
    "使用短生命周期的访问令牌（例如5分钟）和带轮换的刷新令牌，以最小化重放攻击的窗口。相应地配置身份提供者。",
    "监控并告警可疑的令牌使用模式，例如IP快速变化，并自动撤销令牌并要求重新认证。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://oauth.net/2/token-replay/",
  "official_doc_section": null,
  "error_code": "OAUTH2_TOKEN_REPLAY",
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.75,
  "resolvable": "partial",
  "first_seen": "2024-01-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}