testing-oauth2-implementation-flaws

Detect OAuth 2.0 and OpenID Connect implementation flaws during security assessments.

2|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/Acczdy/MoZiSec --skill testing-oauth2-implementation-flaws
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-oauth2-implementation-flaws
Source: https://github.com/Acczdy/MoZiSec/tree/main/api-security/.claude/skills/testing-oauth2-implementation-flaws
Command: npx skills add https://github.com/Acczdy/MoZiSec --skill testing-oauth2-implementation-flaws

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill identifies misconfigurations and implementation flaws in OAuth 2.0 and OpenID Connect deployments that enable authorization code interception, redirect URI manipulation, CSRF in authorization flows, token leakage, scope escalation, PKCE bypass, and improper token handling that can lead to unauthorized access or account takeover.

Core Features & Use Cases

  • Endpoint Reconnaissance & Configuration Discovery: Automatically discover .well-known/openid-configuration, authorization and token endpoints for assessment.
  • Redirect URI, State & PKCE Validation: Test redirect_uri matching, state parameter usage for CSRF protection, and PKCE enforcement for authorization code flows.
  • Token & Scope Analysis: Detect token leakage, implicit flow exposure, scope escalation, code reuse, and improper audience or refresh token binding.
  • Use Case: Assess "Login with X" social login flows for a SaaS application to detect redirect bypass, missing client-side state validation, absent PKCE, and token replay that could result in account takeover.

Quick Start

Test the authorization server at https://auth.example.com with client_id test-client-id and redirect URI https://app.example.com/callback for redirect URI validation, state and PKCE enforcement, scope escalation, and token handling issues and produce a findings report.

Frequently Asked Questions about testing-oauth2-implementation-flaws

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test OAuth2 redirect URI manipulation and bypass vulnerabilities?

To test OAuth2 redirect URI manipulation, you validate redirect_uri matching strictness against the authorization server by injecting manipulated callback paths and analyzing authorization responses. This detects bypass flaws enabling authorization code interception and account takeover.

What is a PKCE bypass and how can I detect it in OpenID Connect flows?

A PKCE bypass occurs when authorization servers fail to enforce Proof Key for Code Exchange requirements. You detect PKCE bypass by performing token exchanges at token endpoints without the code_verifier to confirm if the server improperly issues tokens.

How do I check for CSRF vulnerabilities in OAuth2 authorization flows?

You check for OAuth2 CSRF vulnerabilities by testing state parameter usage during authorization flows. Intercepting and analyzing authorization responses reveals if missing client-side state validation allows cross-site request forgery attacks.

Can I use Python requests to automate OAuth2 token leakage and scope escalation testing?

Yes, you can use Python requests to automate OAuth2 token leakage and scope escalation testing. The library performs HTTP(S) requests and follows redirects to detect improper audience binding and refresh token handling issues.

Does this Skill discover OpenID Connect configuration endpoints automatically?

Yes, this Skill performs endpoint reconnaissance and configuration discovery automatically. It discovers .well-known/openid-configuration, authorization endpoints, and token endpoints to provide targets for security assessments and configuration reviews.

What OAuth2 token handling issues should I test for during a security assessment?

During an OAuth2 security assessment, you should test for token leakage, implicit flow exposure, code reuse, scope escalation, and improper refresh token binding. Validate token audience and exchange mechanisms to prevent unauthorized access.