Skip to main content
Vulnerability Database/CVE-2026-97325

CVE-2026-97325: RuoYi-Vue-Pro OAuth2 Open Redirect Flaw

CVE-2026-97325 is an open redirect vulnerability in YunaiV/zhijiantianya ruoyi-vue-pro OAuth2 client that allows attackers to redirect users to malicious sites. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-97325 Overview

CVE-2026-97325 is an open redirect vulnerability [CWE-601] in YunaiV/zhijiantianya ruoyi-vue-pro through version 2026.08. The flaw resides in the validOAuthClientFromCache function within yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2ClientServiceImpl.java, part of the OAuth2 Client component. Attackers can manipulate the redirect_uri parameter to redirect users to attacker-controlled destinations. The attack can be launched remotely without authentication. A public exploit has been released, and the vendor did not respond to disclosure attempts.

Critical Impact

Attackers can craft malicious OAuth2 authorization links that redirect victims to phishing sites, enabling credential theft and token interception despite the application's trusted domain.

Affected Products

  • YunaiV/zhijiantianya ruoyi-vue-pro up to version 2026.08
  • OAuth2 Client component
  • OAuth2ClientServiceImpl.java within yudao-module-system

Discovery Timeline

  • 2026-09-24 - CVE-2026-97325 published to NVD
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97325

Vulnerability Analysis

The vulnerability is an unvalidated redirect flaw classified under [CWE-601] (URL Redirection to Untrusted Site). The validOAuthClientFromCache method is responsible for validating OAuth2 client parameters, including the redirect_uri passed during authorization requests. The function fails to strictly enforce an allowlist comparison between the submitted redirect_uri and the client's registered callback URLs.

Because OAuth2 authorization endpoints are trusted entry points, a bypass of redirect validation lets attackers abuse the application's domain reputation. Victims clicking a crafted link see the legitimate ruoyi-vue-pro host before being forwarded to an attacker-controlled destination. This behavior underpins phishing, token theft, and authorization code interception scenarios.

Root Cause

The root cause is insufficient validation of the redirect_uri request parameter in OAuth2ClientServiceImpl.java. Matching logic allows URIs that do not exactly correspond to registered client callbacks, permitting arbitrary external destinations to be accepted during the authorization flow.

Attack Vector

Exploitation requires only network access to the application and user interaction. An attacker constructs an authorization URL pointing at the vulnerable ruoyi-vue-pro instance with a redirect_uri value referencing an external host. When a victim follows the link and authenticates, the OAuth2 flow forwards them, along with any authorization code or token fragment, to the attacker's server. See the VulDB entry for CVE-2026-97325 for additional technical context.

Detection Methods for CVE-2026-97325

Indicators of Compromise

  • OAuth2 authorization requests where the redirect_uri parameter points to an external or unregistered domain
  • Access logs showing /oauth2/authorize endpoints followed by HTTP 302 responses to third-party hosts
  • Unusual spikes in OAuth2 client lookups originating from a single source IP or user agent

Detection Strategies

  • Instrument the validOAuthClientFromCache function to log every mismatch between submitted and registered redirect_uri values
  • Deploy web application firewall rules that compare the redirect_uri host against an allowlist of registered callback domains
  • Correlate OAuth2 authorization requests with downstream outbound redirects to identify forwarding to attacker infrastructure

Monitoring Recommendations

  • Monitor application logs for OAuth2 flows terminating at non-corporate domains or newly registered hosts
  • Alert on redirect_uri parameters containing URL-encoded characters, @ symbols, or double-slash patterns used to bypass validation
  • Review OAuth2 client cache entries for unexpected or recently modified callback URL registrations

How to Mitigate CVE-2026-97325

Immediate Actions Required

  • Audit all registered OAuth2 clients in ruoyi-vue-pro and restrict redirect_uri entries to exact, fully qualified callback URLs
  • Place the vulnerable application behind a reverse proxy that enforces redirect host validation at the edge
  • Educate users and SOC teams to treat OAuth2 authorization links with external redirect destinations as suspicious

Patch Information

No vendor patch is referenced in available advisories. The vendor was contacted but did not respond to the disclosure. Monitor the upstream project and the ruoyi-vue-pro repository for future fixes, and apply remediation at the application or proxy layer in the interim.

Workarounds

  • Modify OAuth2ClientServiceImpl.java locally to enforce exact-match comparison between the submitted redirect_uri and the registered client callback URLs
  • Block or sanitize OAuth2 authorization requests containing externally hosted redirect_uri values at the WAF or API gateway
  • Disable or restrict the OAuth2 Client component if it is not required for production operations
bash
# Example WAF rule concept: reject OAuth2 authorize requests with external redirect_uri
# Pseudocode for a reverse-proxy filter
if request.path == "/oauth2/authorize" and
   request.query.redirect_uri.host not in ["app.example.com", "portal.example.com"]:
    deny request

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.