{"id":"CVE-2026-42196","kind":"vulnerability","aliases":["CVE-2026-42196","GHSA-67qg-7284-2277"],"related":[],"title":"django-s3file is vulnerable to relative path traversal","description":"django-s3file is a lightweight file upload input for Django and Amazon S3. Prior to 7.0.2, S3FileMiddleware is vulnerable to relative path traversal attacks, where an attacker can use a modified request to escape pre-signed upload locations and have the Django application load files from random locations into request.FILES. Depending on how files are handled, this may lead to confidentiality and integrity issues. This vulnerability is fixed in 7.0.2.","summary":"django-s3file's S3FileMiddleware accepts a modified upload request whose path escapes the pre-signed upload location. The Django application then loads files from other locations on disk into request.FILES, which can expose or alter data depending on how the app handles uploads.","severity":"critical","cvss":9.9,"epss":0.00565,"exploited":false,"exploited_at":null,"products":[{"name":"django-s3file","fixed":["7.0.2"],"affected":"<= 7.0.1","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["cwe-22","cwe-23","cwe-26","django","package","python","s3","self-hosted"],"not_affected_if":["not-using-django-s3file"],"how_to_check":"- Run `pip show django-s3file` and check whether the version is `7.0.1` or lower.\n- Check whether the project uses `S3FileMiddleware` in `MIDDLEWARE` settings.\n- Check whether application code reads from `request.FILES` for uploaded files that are then stored or processed.","fix":"- Upgrade `django-s3file` to `7.0.2` or later.","status":"open","published_at":"2026-05-05T20:05:49+00:00","first_seen_at":"2026-10-27T16:25:42+00:00","triaged_at":"2026-10-27T16:27:45+00:00","updated_at":"2026-10-27T16:33:07+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-27T16:27:45Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade `django-s3file` to `7.0.2` or later.","reach":"internet","title":"django-s3file: relative path traversal lets requests load arbitrary server files","impact":"high","summary":"django-s3file's S3FileMiddleware accepts a modified upload request whose path escapes the pre-signed upload location. The Django application then loads files from other locations on disk into request.FILES, which can expose or alter data depending on how the app handles uploads.","category":"package","nicknames":[],"who_cares":["django","python","s3","self-hosted"],"confidence":0.7,"needs_auth":"unknown","worst_case":"Attacker reads or alters arbitrary server files via forged upload requests.","analyst_note":"","how_to_check":"- Run `pip show django-s3file` and check whether the version is `7.0.1` or lower.\n- Check whether the project uses `S3FileMiddleware` in `MIDDLEWARE` settings.\n- Check whether application code reads from `request.FILES` for uploaded files that are then stored or processed.","needs_analyst":false,"not_affected_if":["not-using-django-s3file"],"who_is_affected":"Django projects that use django-s3file with S3FileMiddleware to handle direct-to-S3 uploads are exposed, since the middleware is what processes the forged request paths. Projects that do not install django-s3file or do not enable its middleware are not affected by this flaw. The sources do not describe a specific deployment configuration beyond that.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000611,"input_tokens":3388,"output_tokens":545,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2026':11A,19A '-22':25B '-2277':17A '-23':27B '-26':29B '-42196':12A,20A '67qg':15A '7.0.2':98C,153C '7284':16A 'accept':42B 'alter':73B 'amazon':94C 'app':79B 'applic':58B,126C 'attack':106C,109C 'confidenti':144C 'cve':10A,18A 'cwe':24B,26B,28B 'data':74B 'depend':75B,134C 'disk':66B 'django':2A,22A,30B,38B,57B,83C,92C,125C 'django-s3file':1A,21A,37B,82C 'escap':49B,116C 'expos':71B 'file':61B,88C,128C,137C 'fix':151C 'ghsa':14A 'ghsa-67qg':13A 'handl':80B,139C 'host':36B 'input':90C 'integr':146C 'issu':147C 'lead':142C 'lightweight':87C 'load':60B,127C 'locat':55B,64B,121C,131C 'may':141C 'modifi':44B,113C 'packag':31B 'path':8A,48B,104C 'pre':52B,118C 'pre-sign':51B,117C 'prior':96C 'python':32B 'random':130C 'relat':7A,103C 'request':46B,114C 'request.files':68B,133C 's3':33B,95C 's3file':3A,23A,39B,84C 's3filemiddleware':41B,99C 'self':35B 'self-host':34B 'sign':53B,119C 'travers':9A,105C 'upload':45B,54B,81B,89C,120C 'use':111C 'vulner':5A,101C,149C 'whose':47B","nicknames":[],"mitigations":[],"who_affected":"Django projects that use django-s3file with S3FileMiddleware to handle direct-to-S3 uploads are exposed, since the middleware is what processes the forged request paths. Projects that do not install django-s3file or do not enable its middleware are not affected by this flaw. The sources do not describe a specific deployment configuration beyond that.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-05-05T20:05:49+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-67qg-7284-2277","url":"https://github.com/advisories/GHSA-67qg-7284-2277","severity":"critical","published_at":"2026-05-05T20:05:49+00:00","modified_at":"2026-10-27T16:22:35+00:00","first_seen_at":"2026-10-27T16:25:42+00:00","fetched_at":"2026-10-27T16:25:42+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-42196","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42196","severity":null,"published_at":"2026-05-12T22:16:34+00:00","modified_at":"2026-10-26T14:10:00+00:00","first_seen_at":"2026-10-27T16:33:07+00:00","fetched_at":"2026-10-27T16:33:07+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}