Skip to content

Conversation

@vanniktech
Copy link
Contributor

  • Added validateOutputUri() function to validate custom output URIs
  • Only allow content:// URIs, reject file:// URIs to prevent file system attacks
  • Validate file extensions match compress format (JPEG→.jpg/.jpeg, PNG→.png, WEBP→.webp)
  • Added 11 comprehensive unit tests for URI validation
  • Update CHANGELOG.md with security fix documentation

This fix prevents malicious apps from:

  • Using file:// URIs to overwrite sensitive files (e.g., SharedPreferences)
  • Writing arbitrary file types by extension mismatch
  • Exploiting the exported CropImageActivity as described in issue URI validation security issue #613

xronyx and others added 2 commits November 17, 2025 21:47
…ixes #613)

- Added validateOutputUri() function to validate custom output URIs
- Only allow content:// URIs, reject file:// URIs to prevent file system attacks
- Validate file extensions match compress format (JPEG→.jpg/.jpeg, PNG→.png, WEBP→.webp)
- Added 11 comprehensive unit tests for URI validation
- Update CHANGELOG.md with security fix documentation

This fix prevents malicious apps from:
- Using file:// URIs to overwrite sensitive files (e.g., SharedPreferences)
- Writing arbitrary file types by extension mismatch
- Exploiting the exported CropImageActivity as described in issue #613
@vanniktech vanniktech merged commit c16eec2 into main Nov 28, 2025
2 checks passed
@vanniktech vanniktech deleted the fix-ci branch November 28, 2025 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants