GHSA-26jh-r8g2-6fpr — gradio
MEDIUMGHSA-26jh-r8g2-6fpr is a medium-severity (CVSS 5.3) vulnerability in gradio. A fix is available for gradio — see the affected versions and patch details below.
Gradio's dropdown component pre-process step does not limit the values to those in the dropdown list
Real-World Exposure
gradioReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Impact
What kind of vulnerability is it? Who is impacted?
This vulnerability is a data validation issue in the Gradio Dropdown component's pre-processing step. Even if the allow_custom_value parameter is set to False, attackers can bypass this restriction by sending custom requests with arbitrary values, effectively breaking the developer’s intended input constraints. While this alone is not a severe vulnerability, it can lead to more critical security issues, particularly when paired with other vulnerabilities like file downloads from the user's machine.
Patches
Yes, this issue is addressed in gradio>=5.0. Please upgrade to the latest version to resolve the problem.
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
To mitigate the issue without upgrading, developers can add manual validation in their prediction function to check the received values against the allowed dropdown values before processing them.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | gradio | all versions | 5.0.0pip install --upgrade 'gradio==5.0.0' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gradio, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update gradio to 5.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-26jh-r8g2-6fpr is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-26jh-r8g2-6fpr in your dependencies?
Find it across PyPI, including transitive dependencies.