Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 4.2.14 (and 5.0.7) fixes of CVE-2024-39330 break thumbnail generation when optimisations is used #633

Open
heppstux opened this issue Jul 11, 2024 · 1 comment

Comments

@heppstux
Copy link

If set up with easy_thumbnails.optimize, generating any thumbnails will throw:

Detected path traversal attempt in '/Users/[redacted]/media/filer_public_thumbnails/filer_public/b8/0c/b80ca369-7e6f-41fd-8abe-9275a921bdaa/fullsizerender.jpeg__210x119_q85_subsampling-2_upscale.jpg'

The exception is thrown in optimize/post_processor.py while attempting to call storage.save with an absolute file name.

This is prevented by django in order to fix CVE-2024-39330.

I'm a bit unsure, if this is an issue for easy_thumbnails or rather Django.

bmihelac added a commit to bmihelac/easy-thumbnails that referenced this issue Jul 16, 2024
@bmihelac
Copy link
Contributor

Pull request in: #634

If I'm not missing something, the storage save/delete methods should receive a name, not a path.

jrief added a commit that referenced this issue Jul 26, 2024
Fix optimize_thumbnail raises Detected path traversal attempt (#633)
PetrDlouhy pushed a commit to PetrDlouhy/easy-thumbnails that referenced this issue Jul 26, 2024
BigglesZX pushed a commit to BigglesZX/easy-thumbnails that referenced this issue Aug 12, 2024
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

No branches or pull requests

2 participants