CVE-2024-12217

5.3 MEDIUM

📋 TL;DR

This vulnerability in the gradio-app/gradio repository allows attackers to bypass file access restrictions on Windows systems using NTFS Alternate Data Streams syntax. It enables unauthorized reading of files that should be blocked, affecting users running vulnerable versions of gradio on Windows.

💻 Affected Systems

Products:
  • gradio-app/gradio
Versions: git commit 67e4044 and potentially earlier versions with the same blocked_path implementation
Operating Systems: Windows
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Windows systems due to NTFS-specific Alternate Data Streams feature. Linux/macOS systems are not vulnerable to this specific bypass.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could read sensitive system files, configuration files, or application data that should be protected, potentially leading to credential theft, data exfiltration, or further system compromise.

🟠

Likely Case

Unauthorized access to application-specific files that were intended to be restricted, potentially exposing configuration data, temporary files, or other application resources.

🟢

If Mitigated

With proper file system permissions and additional access controls, the impact would be limited to files the application already has permission to access.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability is publicly documented with proof-of-concept examples. Exploitation requires the ability to interact with the gradio application's file access functionality.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check latest gradio releases for fix

Vendor Advisory: https://huntr.com/bounties/0439bf3d-cb38-43a5-8314-0fadf85cc5a0

Restart Required: Yes

Instructions:

1. Update to the latest version of gradio that includes the fix. 2. Verify the blocked_path function properly handles NTFS Alternate Data Streams syntax. 3. Restart the application.

🔧 Temporary Workarounds

Implement additional path validation

windows

Add custom validation to reject paths containing NTFS Alternate Data Streams syntax (::) before blocked_path check

# Add to file access logic: if '::' in requested_path: raise AccessDeniedError

Restrict application permissions

windows

Run gradio with minimal file system permissions to limit accessible directories

# Use Windows ACLs to restrict gradio process to specific directories

🧯 If You Can't Patch

  • Implement network-level controls to restrict access to the gradio application
  • Deploy on non-Windows operating systems where NTFS ADS is not a factor

🔍 How to Verify

Check if Vulnerable:

Test if the application allows file access using paths with '::$DATA' suffix on Windows

Check Version:

pip show gradio | grep Version

Verify Fix Applied:

Verify that paths with NTFS Alternate Data Streams syntax (like 'C:/tmp/secret.txt::$DATA') are properly blocked

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed file access attempts with unusual path patterns
  • File access logs showing paths with '::' characters

Network Indicators:

  • Unusual patterns of file access requests to the gradio application

SIEM Query:

source="gradio_logs" AND (path="*::*" OR error="AccessDenied")

🔗 References

📤 Share & Export