Skip to content
HighVulnerability

CVE-2024-47084: Gradio CORS origin validation flaw allows cross-site requests

Identifier
CVE-2024-47084
Published
Record updated
View JSON
Affected
  • gradio < 4.44.0
Fixed in
4.44.0
  • released September 10, 2024, 31 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.5%

Summary

CVE-2024-47084 affects Gradio, an open-source Python package for quick prototyping. The Gradio server fails to validate the request origin when a cookie is present, so a website an attacker controls can send unauthorized requests to a local Gradio server. An attacker could upload files, steal authentication tokens and access user data if a victim visits the malicious site while logged into Gradio. The issue affects users who deployed Gradio locally with basic authentication.

Mitigation

Upgrade to gradio>4.44. As a workaround, manually enforce stricter CORS origin validation by modifying the CustomCORSMiddleware class in the local Gradio server code, bypassing the condition that skips CORS validation for requests containing cookies.