CVE-2025-31691

9.8 CRITICAL

📋 TL;DR

This vulnerability allows attackers to bypass authorization checks in Drupal OAuth2 Server through forceful browsing, potentially accessing restricted functionality. It affects all Drupal sites using the OAuth2 Server module. The vulnerability exists in all versions before 2.1.0.

💻 Affected Systems

Products:
  • Drupal OAuth2 Server
Versions: 0.0.0 through 2.0.x
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all Drupal installations with the OAuth2 Server module enabled.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could gain unauthorized access to protected OAuth2 endpoints, potentially compromising user authentication flows, stealing tokens, or accessing administrative functionality.

🟠

Likely Case

Unauthorized access to OAuth2 server endpoints leading to token manipulation, privilege escalation, or data exposure.

🟢

If Mitigated

With proper network segmentation and access controls, impact would be limited to the OAuth2 server component only.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Forceful browsing attacks typically require minimal technical skill once endpoint URLs are discovered.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.1.0

Vendor Advisory: https://www.drupal.org/sa-contrib-2025-020

Restart Required: No

Instructions:

1. Update the OAuth2 Server module to version 2.1.0 via Drupal's update manager or Composer. 2. Clear Drupal caches. 3. Verify the update was successful.

🔧 Temporary Workarounds

Disable OAuth2 Server Module

all

Temporarily disable the vulnerable module until patching is possible

drush pm:disable oauth2_server

Web Server Access Controls

all

Implement access restrictions at the web server level for OAuth2 endpoints

🧯 If You Can't Patch

  • Implement strict network access controls to limit access to OAuth2 endpoints
  • Enable detailed logging for all OAuth2 Server module activity and monitor for unauthorized access attempts

🔍 How to Verify

Check if Vulnerable:

Check the installed version of the OAuth2 Server module in Drupal's Extend page or via drush: drush pm:list | grep oauth2_server

Check Version:

drush pm:list --fields=name,version | grep oauth2_server

Verify Fix Applied:

Confirm OAuth2 Server module version is 2.1.0 or higher and test authorization controls on OAuth2 endpoints

📡 Detection & Monitoring

Log Indicators:

  • Unauthorized access attempts to /oauth2/* endpoints
  • Failed authorization checks in Drupal logs
  • Unusual OAuth2 token generation patterns

Network Indicators:

  • Direct requests to OAuth2 endpoints without proper authentication headers
  • Unusual traffic patterns to authorization endpoints

SIEM Query:

source="drupal" AND (uri_path="/oauth2/*" AND (response_status="403" OR response_status="200" with missing auth headers))

🔗 References

📤 Share & Export