{"id":"CVE-2021-45452","published":"2022-01-04T23:09:40Z","modified":"2024-08-04T04:39:21Z","title":"Storage.save in Django 2.2 before 2.2.26, 3.2 before 3.2.11, and 4.0 before 4.0.1 allows directory traversal if…","vendor":null,"product":null,"tier":"tail","description":{"text":"Storage.save in Django 2.2 before 2.2.26, 3.2 before 3.2.11, and 4.0 before 4.0.1 allows directory traversal if crafted filenames are directly passed to it.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.02588,"percentile":0.85644,"provenance":"source"},"cwes":[],"references":[{"url":"https://groups.google.com/forum/#%21forum/django-announce","tags":["x_refsource_MISC"]},{"url":"https://docs.djangoproject.com/en/4.0/releases/security/","tags":["x_refsource_MISC"]},{"url":"https://www.djangoproject.com/weblog/2022/jan/04/security-releases/","tags":["x_refsource_CONFIRM"]},{"url":"https://security.netapp.com/advisory/ntap-20220121-0005/","tags":["x_refsource_CONFIRM"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/","tags":["vendor-advisory","x_refsource_FEDORA"]}],"priority":{"score":17.1,"factors":[{"name":"EPSS percentile","points":17.13}]},"affected":[{"ecosystem":"PyPI","package":"Django","vulnerableRanges":[">=2.2, <2.2.26",">=3.2, <3.2.11",">=4.0, <4.0.1"],"patched":["2.2.26","3.2.11","4.0.1"],"from":["GHSA-jrh2-hc4r-7jwx","PYSEC-2022-3"],"provenance":"source"}],"summary":{"text":"The flaw is a directory traversal issue in the Storage.save method of Django, affecting its file storage component. Storage.save is exposed when filenames are passed to it directly without sanitisation, and an attacker who can supply such crafted filenames can write files outside the intended storage location.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:32:42Z"},"euvd":{"id":"EUVD-2022-0093","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-django-cve-2014-0481","parents":[{"from":"CVE-2014-0481","to":"CVE-2021-45452","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["django/core/files/storage.py"],"commits":["https://github.com/django/django/commit/26cd48e166ac4d84317c8ee6d63ac52a87e8da99","https://github.com/django/django/commit/30042d475bf084c6723c6217a21598d9247a9c41","https://github.com/django/django/commit/4cb35b384ceef52123fc66411a73c36a706825e1","https://github.com/django/django/commit/8d2f7cff76200cbd2337b2cf1707e383eb1fb54b"],"basis":"shared function","functions":["get_available_name"]}]},{"from":"CVE-2020-24583","to":"CVE-2021-45452","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["django/core/files/storage.py"],"commits":["https://github.com/django/django/commit/8d7271578d7b153435b40fe40236ebec43cbf1b9","https://github.com/django/django/commit/4cb35b384ceef52123fc66411a73c36a706825e1","https://github.com/django/django/commit/8d2f7cff76200cbd2337b2cf1707e383eb1fb54b"],"basis":"shared function","functions":["_save"]}]},{"from":"CVE-2021-31542","to":"CVE-2021-45452","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["django/core/files/storage.py"],"commits":["https://github.com/django/django/commit/04ac1624bdc2fa737188401757cf95ced122d26d","https://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48","https://github.com/django/django/commit/4cb35b384ceef52123fc66411a73c36a706825e1","https://github.com/django/django/commit/8d2f7cff76200cbd2337b2cf1707e383eb1fb54b"],"basis":"shared function","functions":["generate_filename","get_available_name"]}]}]}}