CVE-2024-54462

7.1 HIGH

📋 TL;DR

This vulnerability in the image_picker library allows malicious document providers to manipulate file names, potentially overwriting internal app cache files. It affects Flutter apps using image_picker_android on Android devices. Users who install malicious document provider apps are at risk.

💻 Affected Systems

Products:
  • image_picker_android (Flutter package)
Versions: Versions before 0.8.12+18
Operating Systems: Android
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Flutter apps using image_picker_android on Android; iOS version not affected

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Malicious actor overwrites critical app files leading to data corruption, privilege escalation, or app crash

🟠

Likely Case

Local file overwrite in app cache causing data loss or app instability

🟢

If Mitigated

No impact with proper file path validation and sanitization

🌐 Internet-Facing: LOW - Requires local malicious app installation
🏢 Internal Only: MEDIUM - Internal apps could be compromised if users install untrusted document providers

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires user to install malicious document provider and use image picker within vulnerable app

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.8.12+18 or later

Vendor Advisory: https://github.com/flutter/packages/security/advisories/GHSA-98v2-f47x-89xw

Restart Required: No

Instructions:

1. Update pubspec.yaml to use image_picker_android: ^0.8.12+18
2. Run 'flutter pub get'
3. Rebuild and redeploy app

🔧 Temporary Workarounds

Implement custom file validation

android

Add manual file path sanitization before processing selected images

Implement file path validation in image selection callback

🧯 If You Can't Patch

  • Restrict app to trusted document providers only
  • Implement additional file integrity checks in app cache

🔍 How to Verify

Check if Vulnerable:

Check pubspec.yaml for image_picker_android version below 0.8.12+18

Check Version:

grep image_picker_android pubspec.yaml && grep image_picker_android pubspec.lock

Verify Fix Applied:

Confirm image_picker_android version is 0.8.12+18 or higher in pubspec.lock

📡 Detection & Monitoring

Log Indicators:

  • Unexpected file write operations in app cache
  • File permission errors in image processing

Network Indicators:

  • No network indicators - local vulnerability

SIEM Query:

No applicable network SIEM query - monitor app logs for file system anomalies

🔗 References

📤 Share & Export