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·111 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

•27 minutes ago•CVE-2026-105854
8.7

CVE-2026-105854: Regular Expression Denial of Service (ReDoS) and Uncontrolled Resource Consumption in Payload CMS

Payload CMS, a popular open-source headless Content Management System, contains a critical Regular Expression Denial of Service (ReDoS) and uncontrolled resource consumption vulnerability in versions prior to 3.90.0 and canary versions prior to 4.0.0-canary.34. Due to nested quantifiers in the multipart boundary regex validation pattern, and the absence of streaming backpressure controls, remote attackers can trigger catastrophic backtracking and memory exhaustion. This blocks the single-threaded Node.js event loop, resulting in a persistent and complete Denial of Service (DoS).

Amit Schendel
Amit Schendel
1 views•6 min read
•about 2 hours ago•CVE-2026-105855
7.6

CVE-2026-105855: Privilege Escalation via Improper Access Control on Password Fields in Payload CMS

An Improper Access Control vulnerability (CWE-284) in Payload CMS prior to version 3.90.0 and 4.0.0-canary.34 allows authenticated, low-privileged users to bypass field-level access control restrictions and overwrite the password of other accounts, leading to complete account takeover and privilege escalation.

Alon Barad
Alon Barad
6 views•6 min read
•about 3 hours ago•CVE-2026-105804
5.7

CVE-2026-105804: Insecure Default PBKDF2 Password Hashing Configuration in Payload CMS

Payload CMS was discovered to use an insecure default configuration for its password-hashing mechanism. The system requested a 512-byte key from PBKDF2-HMAC-SHA256 with 25,000 iterations, creating a severe cryptographic asymmetry. While the defending server sequentially computed 16 blocks of key material (equivalent to 400,000 internal iterations), an offline attacker only needed to compute the first 32-byte block to verify password guesses. This allowed offline attackers to crack stolen database hashes 16 times faster than intended by the security design.

Alon Barad
Alon Barad
4 views•6 min read
•about 4 hours ago•GHSA-WQ5F-XC86-PV6W
7.8

CVE-2026-96889: Remote Code Execution via Use-After-Free in librsvg (VectorFreed)

VectorFreed identifies a critical Use-After-Free (UAF) memory corruption vulnerability in librsvg (CVE-2026-96889), which manifests when parsing structured SVG documents containing nested XML inclusions (XIncludes) and duplicate entity declarations. The flaw results from an entity ownership conflict where librsvg prematurely deallocates an xmlEntity structure still actively referenced by the underlying libxml2 parser context. When transitively compiled into downstream applications such as the high-performance sharp image processing library, this vulnerability facilitates denial of service and unauthenticated remote code execution on the host operating system.

Amit Schendel
Amit Schendel
4 views•8 min read
•about 6 hours ago•CVE-2026-102275
6.5

CVE-2026-102275: Public/Private Key Identity Confusion in PyJWT OKP JWK Processing

CVE-2026-102275 (GHSA-x33g-cr3x-6449) is a public/private key identity confusion vulnerability in PyJWT versions 2.1.0 through 2.14.0. When importing Octet Key Pair (OKP) JSON Web Keys (JWKs) representing Ed25519 or Ed448 curves, PyJWT fails to verify that the public parameter 'x' matches the private parameter 'd'. An attacker can construct a hybrid JWK combining a victim's public key with the attacker's private key. In protocols like DPoP that bind sessions via public key thumbprints, this allows the attacker to authenticate as the victim while signing proofs with their own private key, fully bypassing sender-constrained security guarantees.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 7 hours ago•CVE-2026-104181
5.4

CVE-2026-104181: Authentication Bypass and Privilege Escalation in Filament Multi-Factor Authentication

An authentication bypass and privilege escalation vulnerability exists in Filament (filamentphp/filament) due to missing password verification during multi-factor authentication (MFA) setup and management. An attacker with access to an active session can modify or disable MFA, leading to account hijacking.

Amit Schendel
Amit Schendel
4 views•6 min read