{"id":"CVE-2021-32052","aliases":["CVE-2021-32052","GHSA-qm57-vhq3-3fwf","BIT-DJANGO-2021-32052","PYSEC-2021-8"],"related":[],"kind":"vulnerability","state":"published","title":"Header injection possible in Django","summary":"In Django 2.2 before 2.2.22, 3.1 before 3.1.10, and 3.2 before 3.2.2 (with Python 3.9.5+), URLValidator does not prohibit newlines and tabs (unless the URLField form field is used). If an application uses values with newlines in an HTTP response, header injection can occur. Django itself is unaffected because HttpResponse prohibits newlines in HTTP headers.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In Django 2.2 before 2.2.22, 3.1 before 3.1.10, and 3.2 before 3.2.2 (with Python 3.9.5+), URLValidator does not prohibit newlines and tabs (unless the URLField form field is used). If an application uses values with newlines in an HTTP response, header injection can occur. Django itself is unaffected because HttpResponse prohibits newlines in HTTP headers.","source":"cvelist"},{"lang":"es","text":"En Django 2.2 versiones anteriores a 2.2.22, 3.1 versiones anteriores a 3.1.10 y 3.2 versiones anteriores a 3.2.2 (con Python 3.9.5+), URLValidator no prohíbe nuevas líneas y pestañas (a menos que sea usado el campo URLField form).&#xa0;Si una aplicación usa valores con nuevas líneas en una respuesta HTTP, puede ocurrir una inyección de encabezado.&#xa0;Django en sí no está afectado porque HttpResponse prohíbe las nuevas líneas en los encabezados HTTP","source":"nvd"}],"published":"2021-05-06T15:49:20.000Z","modified":"2026-09-08T08:46:25.519Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-79","CWE-88"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.2","status":"affected","fixed":"2.2.22"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.1","status":"affected","fixed":"3.1.10"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.2","status":"affected","fixed":"3.2.2"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.2","fixed":"2.2.22"},{"status":"affected","introduced":"3.1","fixed":"3.1.10"},{"status":"affected","introduced":"3.2","fixed":"3.2.2"}],"vendor":"djangoproject","product":"django","cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"34"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"2.2","status":"affected","fixed":"2.2.22"},{"type":"ecosystem","introduced":"3.1","status":"affected","fixed":"3.1.10"},{"type":"ecosystem","introduced":"3.2","status":"affected","fixed":"3.2.2"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"pysec"},{"ranges":[{"type":"semver","introduced":"2.2.0","status":"affected","fixed":"2.2.22"},{"type":"semver","introduced":"3.1.0","status":"affected","fixed":"3.1.10"},{"type":"semver","introduced":"3.2.0","status":"affected","fixed":"3.2.2"}],"ecosystem":"Bitnami","package":"django","purl":"pkg:bitnami/django","source":"bitnami"}],"references":[{"url":"https://groups.google.com/forum/#%21forum/django-announce","tags":["web","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://docs.djangoproject.com/en/3.2/releases/security/","tags":["advisory","patch","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"http://www.openwall.com/lists/oss-security/2021/05/06/1","tags":["advisory","mailing-list","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://www.djangoproject.com/weblog/2021/may/06/security-releases/","tags":["advisory","article","patch","vendor-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/","tags":["vendor-advisory","web","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20210611-0002/","tags":["advisory","third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32052","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/django/django/commit/e1e81aa1c4427411e3c68facdd761229ffea6f6f","tags":["web"],"sources":["ghsa"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1944801","tags":["web"],"sources":["ghsa"]},{"url":"https://docs.djangoproject.com/en/3.2/releases/security","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-qm57-vhq3-3fwf","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/django/django","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-8.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/forum/#!forum/django-announce","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20210611-0002","tags":["web"],"sources":["ghsa"]},{"url":"https://www.djangoproject.com/weblog/2021/may/06/security-releases","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/","tags":["web"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-32052","url":"https://www.cve.org/CVERecord?id=CVE-2021-32052","licence":"CVE Terms of Use","modified":"2024-08-03T23:17:28.409Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qm57-vhq3-3fwf","url":"https://github.com/advisories/GHSA-qm57-vhq3-3fwf","licence":"CC-BY-4.0","modified":"2024-09-20T15:33:15.953Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-32052","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32052","licence":"Public domain","modified":"2026-06-17T03:52:43.533Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-8","url":"https://osv.dev/vulnerability/PYSEC-2021-8","licence":"CC-BY-4.0","modified":"2023-12-06T01:01:13.553Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-DJANGO-2021-32052","url":"https://osv.dev/vulnerability/BIT-DJANGO-2021-32052","licence":"Apache-2.0","modified":"2026-09-08T08:46:25.519Z"}],"updatedAt":"2026-11-25T22:58:01.183Z","epss":{"score":0.02715,"percentile":0.86412,"date":"2026-12-01T12:00:22.000Z"}}