CVE-2026-28415
Description
A flaw was found in Gradio, an open-source Python package. The _redirect_to_target() function in Gradio's OAuth flow accepts an unvalidated _target_url query parameter. A remote attacker can exploit this vulnerability by crafting a malicious URL, leading to an open redirect. This allows the attacker to redirect users to arbitrary external websites, potentially enabling phishing attacks or other forms of user manipulation.
Statement
This MODERATE impact vulnerability in Gradio's OAuth flow allows for open redirection due to an unvalidated _target_url query parameter. Red Hat products utilizing Gradio with OAuth enabled, such as the ansible-chatbot-service, may be affected if running vulnerable versions. Exploitation requires user interaction with the /logout or /login/callback endpoints.
Mitigation
To mitigate this open redirect vulnerability, restrict network access to the Gradio application's `/logout` and `/login/callback` endpoints, particularly if OAuth is enabled. Ensure these endpoints are not directly exposed to untrusted networks or users. If the OAuth functionality is not required for the specific deployment of the Gradio application, consider disabling it to remove the vulnerable attack surface. Consult application documentation for specific configuration details regarding OAuth and endpoint exposure. A service restart or reload may be required for changes to take effect.
Understanding the Weakness (CWE)
Access Control
Technical Impact: Bypass Protection Mechanism; Gain Privileges or Assume Identity
The user may be redirected to an untrusted page that contains malware which may then compromise the user's system. In some cases, an open redirect can also enable the immediate download of a file without the user's permission, because the redirection to an external site may lead to endpoints on those sites that automatically trigger a download action ("drive-by download" [REF-1478]). This will expose the user to extensive risk. The user's interaction with the web server may also be compromised if the malware conducts keylogging or other attacks that steal credentials, personally identifiable information (PII), or other important data.
Access Control,Confidentiality,Other
Technical Impact: Bypass Protection Mechanism; Gain Privileges or Assume Identity; Other
By modifying the URL value to a malicious site, an attacker may successfully launch a phishing scam. The user may be subjected to phishing attacks by being redirected to an untrusted page. The phishing attack may point to an attacker controlled web page that appears to be a trusted web site. The phishers may then steal the user's credentials and then use these credentials to access the legitimate web site. Because the server name in the modified link is identical to the original site, phishing attempts have a more trustworthy appearance.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.