chore(deps): update dependency gradio to v6 [security]#625
Open
renovate[bot] wants to merge 1 commit intomasterfrom
Open
chore(deps): update dependency gradio to v6 [security]#625renovate[bot] wants to merge 1 commit intomasterfrom
renovate[bot] wants to merge 1 commit intomasterfrom
Conversation
4519f4a to
d68a82c
Compare
d68a82c to
052795f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.49.1→6.7.0GitHub Vulnerability Alerts
CVE-2026-27167
Summary
Gradio applications running outside of Hugging Face Spaces automatically enable "mocked" OAuth routes when OAuth components (e.g.
gr.LoginButton) are used. When a user visits/login/huggingface, the server retrieves its own Hugging Face access token viahuggingface_hub.get_token()and stores it in the visitor's session cookie. If the application is network-accessible, any remote attacker can trigger this flow to steal the server owner's HF token. The session cookie is signed with a hardcoded secret derived from the string"-v4", making the payload trivially decodable.Affected Component
gradio/oauth.py— functionsattach_oauth(),_add_mocked_oauth_routes(), and_get_mocked_oauth_info().Root Cause Analysis
1. Real token injected into every visitor's session
When Gradio detects it is not running inside a Hugging Face Space (
get_space() is None), it registers mocked OAuth routes via_add_mocked_oauth_routes()(line 44).The function
_get_mocked_oauth_info()(line 307) callshuggingface_hub.get_token()to retrieve the real HF access token configured on the host machine (viaHF_TOKENenvironment variable orhuggingface-cli login). This token is stored in a dict that is then injected into the session of any visitor who hits/login/callback(line 183):The
mocked_oauth_infodict contains the real token at keyaccess_token(line 329):2. Hardcoded session signing secret
The
SessionMiddlewaresecret is derived fromOAUTH_CLIENT_SECRET(line 50):When running outside a Space,
OAUTH_CLIENT_SECRETis not set, so the secret becomes the constant string"-v4", hashed with SHA-256. Since this value is public (hardcoded in source code), any attacker can decode the session cookie payload without needing to break the signature.In practice, Starlette's
SessionMiddlewarestores the session data as plaintext base64 in the cookie — the signature only provides integrity, not confidentiality. The token is readable by simply base64-decoding the cookie payload.Attack Scenario
Prerequisites
gr.LoginButton,gr.OAuthProfile, etc.)server_name="0.0.0.0",share=True, port forwarding, etc.)OAUTH_CLIENT_SECRETis not set (default outside of Spaces)Steps
http://<target>:7860/login/huggingface/login/callbacksessioncookie containing the real HF token.) to extract theaccess_tokenMinimal Vulnerable Application
Proof of Concept
CVE-2026-28414
Summary
Gradio apps running on Window with Python 3.13+ are vulnerable to an absolute path traversal issue that enables unauthenticated attackers to read arbitrary files from the file system.
Details
Python 3.13+ changed the definition of
os.path.isabsso that root-relative paths like/windows/win.inion Windows are no longer considered absolute paths, resulting in a vulnerability in Gradio's logic for joining paths safely.This can be exploited by unauthenticated attackers to read arbitrary files from the Gradio server, even when Gradio is set up with authentication.
PoC
Impact
Arbitrary file read in the context of the Windows user running Gradio.
CVE-2026-28415
Summary
The _redirect_to_target() function in Gradio's OAuth flow accepts an unvalidated _target_url query parameter, allowing redirection to arbitrary external URLs. This affects the /logout and /login/callback endpoints on Gradio apps with OAuth enabled (i.e. apps running on Hugging Face Spaces with gr.LoginButton).
Details
An attacker can craft a URL like https://my-space.hf.space/logout?_target_url=https://evil.com/phishing that redirects the user to an external site after logout. Because the URL originates from a trusted hf.space domain, users are more likely to trust the link.
Impact
Phishing — an attacker can use the trusted domain to redirect users to a malicious site. No direct data exposure or server-side impact.
Fix
The _target_url parameter is now sanitized to only use the path, query, and fragment, stripping any scheme or host.
CVE-2026-28416
Summary
A Server-Side Request Forgery (SSRF) vulnerability in Gradio allows an attacker to make arbitrary HTTP requests from a victim's server by hosting a malicious Gradio Space. When a victim application uses
gr.load()to load an attacker-controlled Space, the maliciousproxy_urlfrom the config is trusted and added to the allowlist, enabling the attacker to access internal services, cloud metadata endpoints, and private networks through the victim's infrastructure.Details
The vulnerability exists in Gradio's config processing flow when loading external Spaces:
Config Fetching (
gradio/external.py:630):gr.load()callsBlocks.from_config()which fetches and processes the remote Space's configuration.Proxy URL Trust (
gradio/blocks.py:1231-1233): Theproxy_urlfrom the untrusted config is added directly toself.proxy_urls:Built-in Proxy Route (
gradio/routes.py:1029-1031): Every Gradio app automatically exposes a/proxy={url_path}endpoint:Host-based Validation (
gradio/routes.py:365-368): The validation only checks if the URL's host matches any trustedproxy_urlhost:An attacker can set
proxy_urltohttp://169.254.169.254/(AWS metadata) or any internal service, and the victim's server will proxy requests to those endpoints.PoC
Full PoC: https://gist.github.com/logicx24/8d4c1aaa4e70f85d0d0fba06a463f2d6
1. Attacker creates a malicious Gradio Space that returns this config:
{ "mode": "blocks", "components": [...], "proxy_url": "http://169.254.169.254/" # AWS metadata endpoint }2. Victim loads the malicious Space:
3. Attacker exploits the proxy:
Impact
Who is impacted:
gr.load()to load external/untrusted SpacesAttack scenarios:
Release Notes
gradio-app/gradio (gradio)
v6.7.0Compare Source
Features
d720b25- Allow :fastest :cheapest options when loading models. Thanks @dawoodkhan82!e29e1cc- Add Space-specific skill generation togradio skills add. Thanks @abidlabs!978bc6e- Add server functions support to gr.HTML. Thanks @aliabid94!a0fff5c- Add push_to_hub method to gr.HTML. Add a gallery to view notable custom HTML components. Thanks @freddyaboulton!820eff0- Add support for gr.HTML as a layout element. Thanks @aliabid94!d6907ac- addSKILLS.mdto Gradio repo, part 1 + cleanup. Thanks @abidlabs!3e625a0- Better error handling when connection to server is lost. Thanks @abidlabs!Fixes
dcfc429- Fix Button component ignoring thescaleparameter. Thanks @hztBUAA!ccff8b8- Walkthrough Selected Bug. Thanks @freddyaboulton!ac29df8- fix DataFrame NaN values becoming 0 after sorting. Thanks @Mr-Neutr0n!6011b00- Fix absolute path issue in Windows. Thanks @freddyaboulton!7c3fa2a- Fix Loading Spinner Issue Caused by Events Targeting Components In Inactive Tabs. Thanks @freddyaboulton!57707c7- Fix Tab i18n issue. Thanks @freddyaboulton!1387fc6- Fix unload event bug. Thanks @freddyaboulton!81482b5- Lazy load sub-tab and accordion components. Thanks @dawoodkhan82!v6.6.0Compare Source
Features
1c671b3- Hide forms with no elements. Thanks @aliabid94!b01c95a- Rewrite behavior section of docs. Thanks @aliabd!Fixes
d0b3422- Fix stop button not switching back to submit button in chat interface. Thanks @freddyaboulton!6a0c6ea- Refactor translation logic. Thanks @hannahblair!ebbd242- Ensure disconnected toast text is visible. Thanks @hannahblair!6533d38- Fix stop button not working in Audio streaming. Thanks @hysts!a8e6b7b- Fix ColorPicker not firing focus, blur, or submit events after Svelte 5 migration. Thanks @veeceey!db7ab39- Fix Gallery fullscreen button not working in preview mode. Thanks @veeceey!9810396- Fix Gallery preview=True parameter not working on initial load. Thanks @veeceey!e0cd4ca- Fix load examples bug in spa. Thanks @freddyaboulton!a2a0078-Videoto Svelte 5. Thanks @dawoodkhan82!fc7c01e- Validate proxy url host. Thanks @freddyaboulton!b10e17c- fix(reloading): Re-assign config forSpacesReloader. Thanks @cbensimon!dfee0da- Oauth fixes. Thanks @freddyaboulton!8f8cef8- Fix windows tests. Thanks @freddyaboulton!226daba- Fix bug where children of accordions dont get rendered when they are opened programmatically. Thanks @freddyaboulton!c006778- Fix AttributeError in ColoredCheckboxGroup.api_info(). Thanks @hysts!v6.5.1Compare Source
Fixes
26cea7a- Ensure change event fires when slider value changes to 0. Thanks @hannahblair!0eac164- [Hotfix] add pytz to requirements. Thanks @RektPunk!v6.5.0Compare Source
Features
fc366b4- Allow webcam uploads and clipboard paste for gallery. Thanks @freddyaboulton!ddbb6a9- Allow pandas version 3. Thanks @freddyaboulton!Fixes
6594c9c- Migrate Dataset to Svelte 5. Thanks @freddyaboulton!151cbd1- Fix private spaces. Thanks @freddyaboulton!5ecf6d2- Fix CSS root in spaces. Thanks @freddyaboulton!99caae6- Migrate StatusTracker to Svelte 5. Thanks @freddyaboulton!7ed6dfa- Migrate js/fileexplorer to svelte5. Thanks @aliabid94!af5e86f- Migrate gr.MultimodalTextbox. Thanks @hannahblair!8409b7a- Migrate js/code. Thanks @aliabid94!05acc66- Fix Login. Thanks @freddyaboulton!v6.4.0Compare Source
Features
d035856- Fixes gr.JSON lines. Thanks @aliabid94!f04abc3- Refactor gr.HighlightedText. Thanks @hannahblair!07c5280- Addaxis_formatparameters for native plots, and fix SSR mode. Thanks @abidlabs!263c065- Migrate js/json to svelte5. Thanks @aliabid94!f04abc3- Allow transparent and undefined labels in gr.HighlightedText. Thanks @hannahblair!Fixes
0954db4- Fix Dependency docs. Thanks @aliabd!7a1c321- Bump svelte/kit for security reasons. Thanks @freddyaboulton!3115258- Remove textbox scrollbar if value is empty. Thanks @freddyaboulton!db86165- Migrates gr.File. Thanks @aliabid94!3b3b035- Fix Gallery upload after it has been populated. Thanks @freddyaboulton!eb13299- migrate datetime. Thanks @aliabid94!c833708- Fix label in gr.HTML. Thanks @hannahblair!44817db- fix(website): improve Event Listeners table dark mode readability. Thanks @DanielDerefaka!fb4b92a- Add volume control to gr.Video. Thanks @hysts!2afffc2- Migrate ParamTable syntax to svelte 5. Thanks @freddyaboulton!4ce4159- Fix DeepLink Bug. Thanks @freddyaboulton!6d9c2d7- Migrate Textbox to Svelte 5. Thanks @dawoodkhan82!f02c58e- Prevent empty button wrappers from rendering in gr.Chatbot. Thanks @hannahblair!ea2d3e9- Migrate Audio + Upload + Atoms to Svelte 5. Thanks @dawoodkhan82!7f2cf84- Add better related guides section to docs. Thanks @aliabd!5f654d7- Ensure HTML renders in gr.Chatbot. Thanks @hannahblair!299728b- fix: add ARIA landmarks for accessibility. Thanks @majiayu000!31cf0a6- Fix custom button click event triggers in dropdown. Thanks @freddyaboulton!976cd11- Fix html in Multiselect component. Thanks @freddyaboulton!1373713- Migrate Gallery to Svelte 5. Thanks @freddyaboulton!b48da51- Fix bug where Walkthrough Component Freezes. Thanks @freddyaboulton!a52be3f- Hide footer links when set to empty. Thanks @hannahblair!404f6a5- Migrate Markdown components to svelte 5. Thanks @freddyaboulton!c471e96- Migrates dropdown. Thanks @aliabid94!184968a- Add fade effect to overflowing text. Thanks @hannahblair!e202750- Fix bug where UploadProgress initializes with a null upload_id. Thanks @freddyaboulton!6edcea5- Fix dev mode. Thanks @pngwn!f4a14e7- Restore padding param in gr.HTML. Thanks @hannahblair!9a2bc0d- Re-enable SSR mode. Thanks @pngwn!65f94fb- Fix markdown migration. Thanks @aliabid94!c2be5a2- Migrate js/label to svelte5. Thanks @aliabid94!c2f0f19- add conditional rendering for the upload button in multimodal textbox. Thanks @hannahblair!565f07f- Fix gr.Textbox auto-resize regression when lines=1. Thanks @hysts!8a262d6- Migrate UploadButton. Thanks @freddyaboulton!e023cac- Restore gr.Textbox resize listener. Thanks @hannahblair!v6.3.0Compare Source
Features
c99a50b- Add .input() to Video. Thanks @hysts!51b7010- pollen css fix. Thanks @dawoodkhan82!2b4176c- Migrate Sidebar to Svelte 5. Thanks @dawoodkhan82!6f37743- Make check for active page in navbar robust. Thanks @abidlabs!Fixes
6222192- fix(client): make WebP and VTT MIME type detection case-insensitive. Thanks @majiayu000!5206d47- Migrate Model3D to Svelte 5. Thanks @dawoodkhan82!aa362c4- Allow static files when handling events. Thanks @hannahblair!3a39ee4- Fix Bug Where Invisible Columns Take Up Space. Thanks @aliabid94!48f580b- fix: Fix Textbox white background in dark mode. Thanks @Godkunn!ab20c59- feat(client): add generic type parameter to predict() method. Thanks @majiayu000!be89f8c- Migrate DownloadButton to Svelte 5. Thanks @dawoodkhan82!3aee8ae- Allow multiple file messages to be displayed in Chatbot. Thanks @freddyaboulton!6eadb5b- Migrate accordion to svelte 5. Thanks @aliabid94!3b3eaf0- Restore RTL prop to gradio components. Thanks @hannahblair!3194f29- Fix docs for Tab select event. Thanks @freddyaboulton!ba46c2d- Migrate Button to Svelte 5. Thanks @freddyaboulton!fa75712- Add custom buttons togr.Dropdown(multiselect=True)andgr.LinePlotand other native plots. Thanks @abidlabs!6a80a07- fix: support gr.update() for gr.State + update api_visibility docs. Thanks @majiayu000!7fb79d4- Fix bug where tabs don't work inside gr.render. Thanks @freddyaboulton!57dd086- Upgrade color picker to Svelte 5 syntax. Thanks @freddyaboulton!5fae6b7- Fix Infinite Change Event in Browser History. Thanks @freddyaboulton!v6.2.0Compare Source
Features
f1d83fa- Add ability to add custom buttons to components. Thanks @abidlabs!fac3844- Upgradetyto0.0.2. Thanks @abidlabs!c06ded8- Relax version of pydantic dependency in base gradio. Thanks @abidlabs!f753b0c- Add.select()and.input()events togr.FileExplorer. Thanks @abidlabs!Fixes
efb2549- Fix Dataframe Package. Thanks @dawoodkhan82!81b7960- Add error handling to gr.JSON. Thanks @hannahblair!2119a24- Fix custom gr.HTML updates. Thanks @aliabid94!184c596- Two bugs for gr.HTML. Thanks @aliabid94!1724a02- Remove checkmark from windows. Thanks @freddyaboulton!e2c316d- Fix Hot Reload of Custom CSS. Thanks @freddyaboulton!9daf193- Add footer to bottom of page. Thanks @freddyaboulton!b4c00d2- Fix Gallery preview_close event not firing on ESC key. Thanks @majiayu000!6d46ddb- feat: cache NodeJS proxied requests. Thanks @cbensimon!cf27938- Fix issue with HTML status shading even when"show_progress='hidden'". Thanks @abidlabs!5cf1ae5- Fix Dropdown change event when allow_custom_value is true. Thanks @freddyaboulton!b3a3683- Use a slower check rate on windows, otherwise windows locks up. Thanks @freddyaboulton!b27e2cb- Audio Trim Fix. Thanks @dawoodkhan82!b4c69af- Fix Plot display in chatbot. Thanks @freddyaboulton!653f47b- Fix Theme Builder Function. Thanks @freddyaboulton!1fa29ff- Fix AttributeError for proxy_url in get_config. Thanks @majiayu000!1fafaba- Add x-gradio-user-header. Thanks @freddyaboulton!7498fac- Fix image buttons default value. Thanks @freddyaboulton!v6.1.0Compare Source
Features
4476400- Addplayback_positionto gr.Audio and gr.Video, which can be updated and read. Thanks @aliabid94!d6be33e- feat: add link_target parameter to Button component. Thanks @ujjwaltwri!d3966ca- Restore Blocks constructor args deprecated in 6.0 (theme, css, etc.). Thanks @aliabid94!Fixes
0892c29- Fix plot Rendering + visibility bug. Thanks @freddyaboulton!8a6cff6- Fix bug where cancelling an events shows an error in the UI. Thanks @freddyaboulton!e8efab2- Fix Settings. Thanks @freddyaboulton!251add4- JS unit test fix. Thanks @dawoodkhan82!4f6327b- Load visible components in 6.0. Thanks @freddyaboulton!0715279- Fix customjsparam. Thanks @dawoodkhan82!8aaa209- Allow custom HTML components to be defined in jupyter notebooks. Thanks @abidlabs!af3ffa0- Fix: avoid corrupting JSON-like values in CSV sanitization. Thanks @ujjwaltwri!23c9bb5- Fix copy button ingr.Textbox. Thanks @dawoodkhan82!v6.0.2Compare Source
Features
c4c36c7- Fix highlighted text in 6.0. Thanks @freddyaboulton!4e9a330- Fix slider css issue. Thanks @freddyaboulton!Fixes
b9732d1- [BUGFIX] Fix stream file download in gradio client. Thanks @frascuchon!472e164- Make client backwards compatible with version 5. Thanks @freddyaboulton!2a2dd60- 12485 fix mcp client issue. Thanks @freddyaboulton!07fa494- Checkbox Label Fix. Thanks @dawoodkhan82!v6.0.1Compare Source
Features
0f2fa10- chore(deps): ⬆️ update pillow from 11.1.0 to 12.0. Thanks @onuralpszr!96efaab- Update gradio_client version to 2.0.0. Thanks @abidlabs!Fixes
f9e272d- Fix bug where close method does not kill the thread. Thanks [@fredConfiguration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.