{"id":"CVE-2021-31542","published":"2021-05-05T00:00:00Z","modified":"2024-08-03T23:03:33Z","title":"In Django 2.2 before 2.2.21, 3.1 before 3.1.9, and 3.2 before 3.2.1, MultiPartParser, UploadedFile, and FieldFile…","vendor":null,"product":null,"tier":"tail","description":{"text":"In Django 2.2 before 2.2.21, 3.1 before 3.1.9, and 3.2 before 3.2.1, MultiPartParser, UploadedFile, and FieldFile allowed directory traversal via uploaded files with suitably crafted file names.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.05334,"percentile":0.92611,"provenance":"source"},"cwes":[],"references":[{"url":"https://groups.google.com/forum/#%21forum/django-announce","tags":[]},{"url":"https://docs.djangoproject.com/en/3.2/releases/security/","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2021/05/04/3","tags":[]},{"url":"https://www.djangoproject.com/weblog/2021/may/04/security-releases/","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00005.html","tags":["mailing-list"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/","tags":["vendor-advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20210618-0001/","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/","tags":["vendor-advisory"]},{"url":"https://github.com/django/django/commit/04ac1624bdc2fa737188401757cf95ced122d26d","tags":[]},{"url":"https://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48","tags":[]},{"url":"https://github.com/django/django/commit/c98f446c188596d4ba6de71d1b77b4a6c5c2a007","tags":[]}],"priority":{"score":18.5,"factors":[{"name":"EPSS percentile","points":18.52}]},"affected":[{"ecosystem":"PyPI","package":"Django","vulnerableRanges":[">=2.2, <2.2.21",">=3.0, <3.1.9",">=3.2, <3.2.1",">=3.1, <3.1.9"],"patched":["2.2.21","3.1.9","3.2.1"],"from":["GHSA-rxjp-mfm9-w4wr","PYSEC-2021-7"],"provenance":"source"}],"euvd":{"id":"EUVD-2021-0064","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-django-cve-2018-7537","parents":[{"from":"CVE-2020-24583","to":"CVE-2021-31542","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/04ac1624bdc2fa737188401757cf95ced122d26d","https://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48"],"basis":"rarely changed file"}]}],"children":[{"from":"CVE-2021-31542","to":"CVE-2022-23833","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["django/http/multipartparser.py"],"commits":["https://github.com/django/django/commit/04ac1624bdc2fa737188401757cf95ced122d26d","https://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48","https://github.com/django/django/commit/c477b761804984c932704554ad35f78a2e230c6a","https://github.com/django/django/commit/d16133568ef9c9b42cb7a08bdf9ff3feec2e5468"],"basis":"rarely changed file"}]},{"from":"CVE-2021-31542","to":"CVE-2023-24580","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["django/http/multipartparser.py"],"commits":["https://github.com/django/django/commit/04ac1624bdc2fa737188401757cf95ced122d26d","https://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48","https://github.com/django/django/commit/628b33a854a9c68ec8a0c51f382f304a0044ec92","https://github.com/django/django/commit/83f1ea83e4553e211c1c5a0dfc197b66d4e50432"],"basis":"rarely changed file"}]},{"from":"CVE-2021-31542","to":"CVE-2023-43665","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["django/utils/text.py"],"commits":["https://github.com/django/django/commit/04ac1624bdc2fa737188401757cf95ced122d26d","https://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48","https://github.com/django/django/commit/be9c27c4d18c2e6a5be8af4e53c0797440794473","https://github.com/django/django/commit/c7b7024742250414e426ad49fb80db943e7ba4e8"],"basis":"shared function","functions":["_truncate_html"]}]}],"packageHistory":[{"cve":"CVE-2020-24584","published":"2020-09-01","fixed":"3.1.1","kev":false},{"cve":"CVE-2021-3281","published":"2021-02-02","fixed":"3.1.6","kev":false},{"cve":"CVE-2021-28658","published":"2021-04-06","fixed":"3.1.8","kev":false,"link":{"from":"CVE-2021-28658","to":"CVE-2021-31542","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"2.2.20","toFixed":"2.2.21","daysApart":29},{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"3.1.8","toFixed":"3.1.9","daysApart":29},{"kind":"similar","provenance":"machine","score":0.64,"basis":"same package + description similarity"}]}},{"cve":"CVE-2021-31542","published":"2021-05-05","fixed":"3.2.1","kev":false},{"cve":"CVE-2021-32052","published":"2021-05-06","fixed":"3.2.2","kev":false,"link":{"from":"CVE-2021-31542","to":"CVE-2021-32052","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"2.2.21","toFixed":"2.2.22","daysApart":1},{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"3.1.9","toFixed":"3.1.10","daysApart":1}]}},{"cve":"CVE-2021-33203","published":"2021-06-08","fixed":"3.2.4","kev":false},{"cve":"CVE-2021-33571","published":"2021-06-08","fixed":"3.2.4","kev":false}],"package":"PyPI:Django"}}