Junglewise Threat Intelligence

CVE-2024-47084: PYSEC-2024-196 - Gradio is an open-source Python package designed for quick prototyping. This vulnerability is related to **CORS origin validation**, where t

CVE-2024-47084 · Severity: low · CVSS 3.1 · Published 2024-10-10

Technologies: gradio (PyPI). Vendors: PyPI.

Executive brief

Gradio, a popular framework for building web-based machine learning applications, contains a flaw in its cross-origin request protection that allows attackers to bypass security checks when a user has an active session cookie. An attacker can craft a malicious website that, when visited by a Gradio user, makes unauthorized requests to steal authentication tokens, upload malicious files, or access sensitive user data stored in the Gradio application.

Technical details

This is a CORS (Cross-Origin Resource Sharing) origin validation bypass vulnerability in Gradio's CustomCORSMiddleware. The vulnerable code fails to validate the request origin when the HTTP request contains cookies, allowing cross-origin requests that should be rejected. An attacker can exploit this via a malicious website using JavaScript (requires user interaction—victim must visit the attacker's site while logged into Gradio locally). The attack achieves unauthorized file uploads, token theft, and data exfiltration. The fix is available in Gradio 4.44 and later; users on earlier versions can manually patch the CustomCORSMiddleware class or upgrade immediately.

Affected products

  • Gradio Gradio before 4.44

Timeline

  • 2024-10-10: disclosed
  • 2024-10-10: patched: Gradio 4.44 released

References

Related threats