-
Notifications
You must be signed in to change notification settings - Fork 451
Labels
backendRelates to the project backendRelates to the project backendpythonRelates to Python codeRelates to Python code
Description
Terms
- I have searched all open bug reports
- I agree to follow activist's Code of Conduct
Behavior
Description
The scrub_exif() function in backend/content/serializers.py contains security vulnerabilities that could lead to denial of service attacks, memory exhaustion, and bypass of security controls.
Affected Code
The vulnerability occurs in:
scrub_exif() function (lines 74-133)
Steps to Reproduce
- Upload a large image file (>10MB) through any image upload endpoint
- Upload a non-image file with image extension
- Upload an image with extremely large dimensions but small file size (decompression bomb)
- Observe that current code processes these without proper validation
Expected Behavior
- Files exceeding size limits should be rejected with clear error messages
- Non-image files should be detected and rejected
Actual Behavior
- Generic
except Exceptioncatches all errors and allows malicious files through - No file size validation before processing
Metadata
Metadata
Assignees
Labels
backendRelates to the project backendRelates to the project backendpythonRelates to Python codeRelates to Python code
Type
Projects
Status
Todo