{"id":"GHSA-pcjh-6r5h-r92r","kind":"vulnerability","aliases":["GHSA-pcjh-6r5h-r92r"],"related":[],"title":"django-sendfile2 before 0.7.0 contains reflected file download vulnerability","description":"Similar to CVE-2022-36359 for Django, django-sendfile2 did not protect against a reflected file download attack in version 0.6.1 and earlier. If the file name used by django-sendfile2 was derived from user input, then it would be possible to perform a such an attack. A new version of django-sendfile2 will be released. Either download django-sendfile2 0.7.0 as a workaround or sanitize user input yourself, using Django's patch as a template: https://github.com/django/django/commit/bd062445cffd3f6cc6dcd20d13e2abed818fa173","summary":"django-sendfile2 up to 0.6.1 does not protect against reflected file downloads, so a file name taken from user input can be served with an attacker-chosen name. An attacker can craft a link that makes a victim's browser download a file the server returns under a name the attacker controls.","severity":"high","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"django-sendfile2","fixed":["0.7.0"],"affected":"< 0.7.0","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["cwe-20","django","django-sendfile2","package","python"],"not_affected_if":["fixed-file-names","not-using-django-sendfile2"],"how_to_check":"- Run `pip show django-sendfile2` and confirm the installed version is below `0.7.0`.\n- Search the codebase for calls to django-sendfile2 and check whether the file name passed to it comes from request parameters or other user input.","fix":"- Upgrade django-sendfile2 to `0.7.0`.\n- If upgrading is not possible, sanitize user-supplied file names before passing them to django-sendfile2, following Django's patch for CVE-2022-36359 (https://github.com/django/django/commit/bd062445cffd3f6cc6dcd20d13e2abed818fa173).","status":"open","published_at":"2022-08-11T18:12:35+00:00","first_seen_at":"2026-10-24T06:33:21+00:00","triaged_at":"2026-10-25T05:41:48+00:00","updated_at":"2026-10-25T05:41:48+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-25T05:41:48Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade django-sendfile2 to `0.7.0`.\n- If upgrading is not possible, sanitize user-supplied file names before passing them to django-sendfile2, following Django's patch for CVE-2022-36359 (https://github.com/django/django/commit/bd062445cffd3f6cc6dcd20d13e2abed818fa173).","reach":"internet","title":"django-sendfile2: reflected file download when file names come from user input","impact":"low","summary":"django-sendfile2 up to 0.6.1 does not protect against reflected file downloads, so a file name taken from user input can be served with an attacker-chosen name. An attacker can craft a link that makes a victim's browser download a file the server returns under a name the attacker controls.","category":"package","nicknames":[],"who_cares":["python","django","django-sendfile2"],"confidence":0.8,"needs_auth":"unknown","worst_case":"victim's browser downloads an attacker-named file from the site","analyst_note":"","how_to_check":"- Run `pip show django-sendfile2` and confirm the installed version is below `0.7.0`.\n- Search the codebase for calls to django-sendfile2 and check whether the file name passed to it comes from request parameters or other user input.","needs_analyst":false,"not_affected_if":["fixed-file-names","not-using-django-sendfile2"],"who_is_affected":"Applications that use django-sendfile2 to serve files whose names are derived from user input are exposed. Projects that only serve fixed, server-chosen file names, or that do not use django-sendfile2, can skip this.","user_interaction":"yes","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000634,"input_tokens":3439,"output_tokens":580,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-20':25B '-2022':89C '-36359':90C '/django/django/commit/bd062445cffd3f6cc6dcd20d13e2abed818fa173':168C '0.6.1':37B,107C '0.7.0':5A,150C '6r5h':14A,19A 'attack':59B,63B,84B,104C,134C 'attacker-chosen':58B 'browser':73B 'chosen':60B 'contain':6A 'control':85B 'craft':65B 'cve':88C 'cwe':24B 'deriv':120C 'django':2A,22A,26B,28B,33B,92C,94C,117C,140C,148C,160C 'django-sendfile2':1A,21A,27B,32B,93C,116C,139C,147C 'download':9A,44B,74B,103C,146C 'earlier':109C 'either':145C 'file':8A,43B,47B,76B,102C,112C 'ghsa':12A,17A 'ghsa-pcjh-6r5h-r92r':11A,16A 'github.com':167C 'github.com/django/django/commit/bd062445cffd3f6cc6dcd20d13e2abed818fa173':166C 'input':52B,123C,157C 'link':67B 'make':69B 'name':48B,61B,82B,113C 'new':136C 'packag':30B 'patch':162C 'pcjh':13A,18A 'perform':130C 'possibl':128C 'protect':40B,98C 'python':31B 'r92r':15A,20A 'reflect':7A,42B,101C 'releas':144C 'return':79B 'sanit':155C 'sendfile2':3A,23A,29B,34B,95C,118C,141C,149C 'serv':55B 'server':78B 'similar':86C 'taken':49B 'templat':165C 'use':114C,159C 'user':51B,122C,156C 'version':106C,137C 'victim':71B 'vulner':10A 'workaround':153C 'would':126C","nicknames":[],"mitigations":[],"who_affected":"Applications that use django-sendfile2 to serve files whose names are derived from user input are exposed. Projects that only serve fixed, server-chosen file names, or that do not use django-sendfile2, can skip this.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2022-08-11T18:12:35+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-pcjh-6r5h-r92r","url":"https://github.com/advisories/GHSA-pcjh-6r5h-r92r","severity":"high","published_at":"2022-08-11T18:12:35+00:00","modified_at":"2026-10-24T06:30:30+00:00","first_seen_at":"2026-10-24T06:33:21+00:00","fetched_at":"2026-10-24T06:33:21+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"}