CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-28415

Open Redirect in Gradio OAuth Flow Enables Phishing Attacks

Alon Barad
Alon Barad
Software Engineer

Mar 1, 2026·5 min read·53 visits

Executive Summary (TL;DR)

Gradio versions prior to 6.6.0 contain an Open Redirect vulnerability in the OAuth login/logout endpoints. Attackers can manipulate the `_target_url` parameter to redirect users to malicious external domains. This is patched in version 6.6.0 by enforcing relative path redirects.

A security vulnerability has been identified in Gradio, a popular Python library for building machine learning demonstrations. The flaw exists within the OAuth authentication workflow, specifically in the `_redirect_to_target` function found in `gradio/oauth.py`. This function fails to properly validate the `_target_url` query parameter before issuing an HTTP 302 redirect. Consequently, an unauthenticated attacker can craft malicious URLs that leverage the trust of a legitimate Gradio application domain (such as those hosted on Hugging Face Spaces) to redirect users to arbitrary external sites. This mechanism is frequently employed in phishing campaigns to harvest credentials or distribute malware by masking the destination behind a trusted domain.

Vulnerability Overview

Gradio is an open-source Python package widely used for creating and sharing machine learning applications, particularly within the Hugging Face ecosystem. The library provides built-in authentication mechanisms via OAuth to secure these applications. A vulnerability was discovered in how the library handles post-authentication and post-logout redirects.

The specific flaw is an Open Redirect (CWE-601) located in the _redirect_to_target function. This function is responsible for guiding the user's browser to a specific page after a login or logout action completes. By default, it accepts a target URL from the incoming request's query parameters.

Because the application fails to validate whether the destination URL resides within the application's own domain, an attacker can manipulate this parameter. This allows them to generate links that appear to originate from a trusted domain (e.g., myapp.hf.space) but actually redirect the victim to an attacker-controlled site immediately after interaction.

Root Cause Analysis

The root cause of this vulnerability is the direct, unsanitized usage of user-controlled input in an HTTP response header. The vulnerable logic resides in gradio/oauth.py within the _redirect_to_target helper function.

In the vulnerable versions, the function retrieves the _target_url query parameter from the FastAPI request object and passes it directly to the RedirectResponse constructor. The RedirectResponse class in Starlette/FastAPI sets the Location header to the provided string and issues a 302 Found status code.

The code does not check if the URL is absolute (containing a scheme and hostname) or relative. The lack of an allowlist or domain validation means that any valid URL string is accepted. If an attacker supplies https://evil.com, the server explicitly instructs the browser to navigate there, treating the external domain as a valid destination for the application flow.

Code Analysis: Vulnerable vs. Patched

The remediation involves parsing the input URL and stripping out the scheme (protocol) and network location (hostname), effectively forcing all redirects to be relative to the application's root.

Vulnerable Code (gradio/oauth.py):

def _redirect_to_target(
    request: fastapi.Request, default_target: str = "/"
) -> RedirectResponse:
    # VULNERABLE: Takes the parameter directly from the request
    target = request.query_params.get("_target_url", default_target)
    # Returns a 302 Redirect to the exact string provided
    return RedirectResponse(target)

Patched Code (Fixed in v6.6.0):

import urllib.parse
 
def _redirect_to_target(
    request: fastapi.Request, default_target: str = "/"
) -> RedirectResponse:
    target = request.query_params.get("_target_url", default_target)
    
    # PATCH: Parse the URL to inspect its components
    parsed = urllib.parse.urlparse(target)
    
    # Construct a 'safe' target using only the path, query, and fragment.
    # This discards 'scheme' (http/https) and 'netloc' (domain.com).
    safe_target = parsed.path or "/"
    if parsed.query:
        safe_target += "?" + parsed.query
    if parsed.fragment:
        safe_target += "#" + parsed.fragment
        
    return RedirectResponse(safe_target)

This robust fix ensures that even if an attacker supplies https://evil.com/login, urllib.parse separates the components. The logic then reconstructs the URL using only the path /login, keeping the user on the legitimate site.

Exploitation Scenarios

Exploitation of CVE-2026-28415 requires user interaction but is trivial to execute. The attacker needs to craft a URL pointing to a vulnerable Gradio instance's logout or login callback endpoints.

Attack Scenario:

  1. Preparation: The attacker sets up a phishing page at https://evil-login.com that mimics the look and feel of the target Gradio app or Hugging Face login.
  2. Delivery: The attacker sends a phishing email or message containing a link: https://trusted-app.hf.space/logout?_target_url=https://evil-login.com.
  3. Execution: The victim clicks the link. They see the domain trusted-app.hf.space and trust it. The application processes the logout request and immediately responds with Location: https://evil-login.com.
  4. Compromise: The browser automatically follows the redirect. The user, believing they simply logged out, may see a fake "Session Expired, Please Login Again" prompt on the attacker's site and enter their credentials.

This vector is particularly effective because security training often emphasizes checking the domain of the initial link. Since the initial link is legitimate, it bypasses basic user scrutiny.

Impact Assessment

While Open Redirect vulnerabilities do not directly allow for Remote Code Execution (RCE) or database access, they are a critical enabler for sophisticated social engineering attacks.

Trust Exploitation: The primary impact is the weaponization of the organization's reputation. Security controls like email filters often allowlist known domains (e.g., *.hf.space). An open redirect allows malicious payloads to ride on these allowlisted domains.

OAuth Token Leakage: In some OAuth misconfigurations, if the redirect occurs during the authorization phase and the attacker controls the redirect URI, it may be possible to leak authorization codes or access tokens via the Referer header or direct URL parameters, although the patch here specifically addresses the destination after the flow completes.

CVSS Context: The assigned score of 4.3 (Medium) reflects that while the technical impact on the server is nil (Integrity: Low, Confidentiality: None), the requirement for user interaction and the limitation to client-side redirection constrains the severity.

Official Patches

GradioOfficial Fix Commit

Fix Analysis (1)

Technical Appendix

CVSS Score
4.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
EPSS Probability
0.03%
Top 92% most exploited

Affected Systems

Gradio < 6.6.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
Gradio
Gradio
< 6.6.06.6.0
AttributeDetail
CWE IDCWE-601
Attack VectorNetwork
CVSS v3.14.3 (Medium)
ImpactPhishing / Redirect
Exploit StatusPoC Available
EPSS Score0.00028 (Low)

MITRE ATT&CK Mapping

T1566.002Spearphishing Link
Initial Access
T1204.001User Execution: Malicious Link
Execution
CWE-601
Open Redirect

URL Redirection to Untrusted Site ('Open Redirect')

Known Exploits & Detection

GitHubRegression tests included in the patch demonstrate the exploit vector.

Vulnerability Timeline

Patch committed to main branch
2026-02-17
Gradio v6.6.0 released
2026-02-27
Vulnerability Disclosed (CVE-2026-28415)
2026-02-27

References & Sources

  • [1]GitHub Security Advisory
  • [2]NIST NVD Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•13 minutes ago•CVE-2026-48748
7.5

CVE-2026-48748: Netty HTTP/3 QPACK Blocked Streams Memory Exhaustion

CVE-2026-48748 is a denial-of-service vulnerability in Netty's HTTP/3 codec (netty-codec-http3) occurring when QPACK dynamic tables are enabled but the blocked streams limit is not explicitly configured. A bug in limit checking and a memory leak in stream tracking allow unauthenticated remote attackers to exhaust the JVM heap memory and crash the server.

Amit Schendel
Amit Schendel
0 views•6 min read
•42 minutes ago•CVE-2026-50009
4.8

CVE-2026-50009: Stateless Reset Token Exposure in Netty QUIC

CVE-2026-50009 is a cryptographic design vulnerability in the Netty network application framework. Prior to version 4.2.15.Final, the framework's QUIC protocol implementation fails to cryptographically segregate the generated Connection IDs and the associated Stateless Reset Tokens. An on-path network attacker who sniffs traffic during a Connection ID rotation can extract secret token material from cleartext headers, enabling them to inject spoofed reset packets and terminate active connections.

Alon Barad
Alon Barad
0 views•6 min read
•about 1 hour ago•CVE-2026-50010
7.5

CVE-2026-50010: Hostname Verification Bypass in Netty TLS Client

A critical hostname verification bypass vulnerability exists in the Netty network application framework when configured as a TLS client. When a developer registers a custom plain X509TrustManager, Netty wraps it inside an X509TrustManagerWrapper to adapt it to the X509ExtendedTrustManager API. However, this wrapper discards the SSLEngine context, bypassing critical hostname checks. Because the wrapper is identified as an X509ExtendedTrustManager, standard cryptographic engines and Netty's OpenSSL wrappers do not re-wrap it, failing to execute any hostname validation. Consequently, clients silently accept certificates for any host, enabling unauthenticated Man-in-the-Middle (MitM) attacks.

Amit Schendel
Amit Schendel
0 views•8 min read
•about 2 hours ago•CVE-2026-50011
7.5

CVE-2026-50011: Unbounded Resource Pre-Allocation in Netty Redis Codec

An uncontrolled resource pre-allocation flaw in the Netty Redis codec module allows remote unauthenticated attackers to cause a denial of service (OutOfMemoryError) by sending a crafted Redis Serialization Protocol (RESP) array header.

Amit Schendel
Amit Schendel
1 views•7 min read
•about 2 hours ago•CVE-2026-50020
5.3

CVE-2026-50020: HTTP Request Smuggling in Netty HttpObjectDecoder via Arbitrary Leading Control Bytes

CVE-2026-50020 is a medium-severity HTTP Request Smuggling/Response Smuggling vulnerability (CWE-444) within the Netty asynchronous network application framework. The flaw resides in Netty's HTTP codec implementation, specifically the HttpObjectDecoder class, which silently consumes arbitrary ISO control bytes preceding the first request line.

Alon Barad
Alon Barad
3 views•7 min read
•about 3 hours ago•CVE-2026-50560
6.9

CVE-2026-50560: Denial of Service in Netty HTTP/2 Codec via Max Header List Size Exception

CVE-2026-50560 describes a vulnerability in Netty's HTTP/2 codec implementation. When acting as an intermediary (such as a reverse proxy, API gateway, or edge server), Netty can be forced into an application-level Denial-of-Service condition. The attack is triggered by negotiating a restrictive SETTINGS_MAX_HEADER_LIST_SIZE from the client, causing Netty to process incoming requests fully, but subsequently crash or abort during outbound response serialization. This results in an asymmetrical consumption of resources on backend systems and thread starvation within the Netty event loop.

Alon Barad
Alon Barad
3 views•6 min read