CVE-2025-54576

9.1 CRITICAL

📋 TL;DR

This vulnerability allows attackers to bypass authentication in OAuth2-Proxy by crafting URLs with query parameters that match regex patterns in the skip_auth_routes configuration. Organizations using OAuth2-Proxy versions 7.10.0 and below with regex patterns in skip_auth_routes are affected. The bypass occurs because the regex matching includes query parameters in the comparison.

💻 Affected Systems

Products:
  • oauth2-proxy
Versions: 7.10.0 and below
Operating Systems: All
Default Config Vulnerable: ✅ No
Notes: Only deployments using skip_auth_routes configuration with regex patterns are vulnerable. Exact path matches are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete authentication bypass allowing unauthorized access to all protected resources behind the proxy, potentially exposing sensitive data and systems.

🟠

Likely Case

Targeted authentication bypass for specific protected endpoints, leading to unauthorized data access or privilege escalation.

🟢

If Mitigated

Limited or no impact if skip_auth_routes uses exact path matches or properly anchored regex patterns without wildcards.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires knowledge of skip_auth_routes patterns and involves simple URL manipulation with query parameters.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 7.11.0

Vendor Advisory: https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-7rh7-c77v-6434

Restart Required: Yes

Instructions:

1. Update oauth2-proxy to version 7.11.0 or later. 2. Restart the oauth2-proxy service. 3. Verify the update with 'oauth2-proxy --version'.

🔧 Temporary Workarounds

Audit and tighten regex patterns

all

Review all skip_auth_routes configurations and replace overly permissive patterns with exact path matches or properly anchored regex.

Review configuration files for skip_auth_routes patterns

Implement query parameter stripping

all

Add custom middleware to strip query parameters before regex matching in the request processing pipeline.

Implement custom request processing logic before oauth2-proxy

🧯 If You Can't Patch

  • Audit all skip_auth_routes configurations and ensure regex patterns are properly anchored with ^ and $
  • Replace wildcard patterns with exact path matches wherever possible

🔍 How to Verify

Check if Vulnerable:

Check if using oauth2-proxy version 7.10.0 or below AND have skip_auth_routes configured with regex patterns containing wildcards or broad matching.

Check Version:

oauth2-proxy --version

Verify Fix Applied:

Verify oauth2-proxy version is 7.11.0 or later and test authentication bypass attempts with crafted URLs containing query parameters.

📡 Detection & Monitoring

Log Indicators:

  • Unusual access patterns to protected routes without authentication logs
  • Requests with crafted query parameters matching skip_auth_routes patterns

Network Indicators:

  • HTTP requests with query parameters accessing typically protected endpoints without authentication headers

SIEM Query:

source="oauth2-proxy" AND (event="authentication_bypass" OR (status=200 AND auth="none" AND uri MATCHES skip_auth_routes_patterns))

🔗 References

📤 Share & Export