{"id":"CVE-2021-21416","aliases":["CVE-2021-21416","GHSA-58c7-px5v-82hh","PYSEC-2021-11"],"related":[],"kind":"vulnerability","state":"published","title":"Potential sensitive information disclosed in error reports","summary":"django-registration is a user registration package for Django. The django-registration package provides tools for implementing user-account registration flows in the Django web framework. In django-registration prior to 3.1.2, the base user-account registration view did not properly apply filters to sensitive data, with the result that sensitive data could be included in error reports rather than removed automatically by Django. Triggering this requires: A site is using django-registration < 3.1.2, The site has detailed error reports (such as Django's emailed error reports to site staff/developers) enabled and a server-side error (HTTP 5xx) occurs during an attempt by a user to register an account. Under these conditions, recipients of the detailed error report will see all submitted data from the account-registration attempt, which may include the user's proposed credentials (such as a password).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"django-registration is a user registration package for Django. The django-registration package provides tools for implementing user-account registration flows in the Django web framework. In django-registration prior to 3.1.2, the base user-account registration view did not properly apply filters to sensitive data, with the result that sensitive data could be included in error reports rather than removed automatically by Django. Triggering this requires: A site is using django-registration < 3.1.2, The site has detailed error reports (such as Django's emailed error reports to site staff/developers) enabled and a server-side error (HTTP 5xx) occurs during an attempt by a user to register an account. Under these conditions, recipients of the detailed error report will see all submitted data from the account-registration attempt, which may include the user's proposed credentials (such as a password).","source":"cvelist"},{"lang":"en","text":"django-registration is a user-registration application for Django. \n\n### Impact\n\nThe django-registration package provides tools for implementing user-account registration flows in the Django web framework. In django-registration prior to 3.1.2, the base user-account registration view did not properly apply filters to sensitive data, with the result that sensitive data could be included in error reports rather than removed automatically by Django.\n\nTriggering this requires the following conditions:\n\n* A site is using django-registration < 3.1.2\n* The site has detailed error reports (such as Django's [emailed error reports to site staff/developers](https://docs.djangoproject.com/en/3.1/howto/error-reporting/#email-reports)) enabled\n* A server-side error (HTTP 5xx) occurs during an attempt by a user to register an account\n\nUnder these conditions, recipients of the detailed error report will see all submitted data from the account-registration attempt, which may include the user's proposed credentials (such as a password).\n\n### Patches\n\nAs of version 3.1.2, django-registration properly applies Django's `sensitive_post_parameters()` decorator to the base user-registration view, which will cause all data from the HTTP request body to be filtered from detailed error reports in the event of a server-side crash during user account registration.\n\nNote that as applied, this filters *all* HTTP request data from error reports. To selectively allow some fields but not others, see Django's own documentation (in references) and the notes below for how to apply `sensitive_post_parameters()` manually to a particular codebase's `RegistrationView` subclass(es).\n\n### Workarounds\n\nUsers who cannot upgrade quickly can apply the `django.views.decorators.debug.sensitive_post_parameters()` decorator to their own registration views. The decorator should be applied on the `dispatch()` method of the appropriate `RegistrationView` class, using Django's `method_decorator()` helper. For example:\n\n```python\nfrom django.utils.decorators import method_decorator\nfrom django.views.decorators.debug import sensitive_post_parameters\n\nfrom django_registration.views import RegistrationView\n\nclass MyRegistrationView(RegistrationView):\n    \"\"\"\n    A RegistrationView subclass manually protected against sensitive information disclosure\n    in error reports.\n\n    \"\"\"\n    @method_decorator(sensitive_post_parameters())\n    def dispatch(self, *args, **kwargs):\n        return super().dispatch(*args, **kwargs)\n```\n\n### References\n\n* Django's documentation on [error reporting in production](https://docs.djangoproject.com/en/3.1/howto/error-reporting/)\n* [How Django's sensitive-data filters work](https://docs.djangoproject.com/en/3.1/howto/error-reporting/#filtering-error-reports)","format":"markdown","source":"ghsa"},{"lang":"es","text":"django-registration es un paquete de registro de usuarios para Django.&#xa0;El paquete django-registration proporciona herramientas para implementar flujos de registro de cuentas de usuario en el framework web de Django.&#xa0;En django-registration anterior a versión 3.1.2, la vista de registro de la cuenta de usuario base no aplicaba filtros correctamente a los datos confidenciales, con el resultado de que los datos confidenciales podrían incluirse en los reportes de errores en lugar de ser eliminados automáticamente por Django.&#xa0;Activar esto requiere: Un sitio está usando django-registration versiones anteriores a 3.1.2, El sitio tiene reportes de error detallados (como los reportes de error enviados por correo electrónico de Django al personal y desarrolladores del sitio) habilitados y se produce un error del lado del servidor (HTTP 5xx) durante un intento de por parte de un usuario de un registro de cuenta.&#xa0;Bajo estas condiciones, los destinatarios del reporte de error detallado verán todos los datos enviados desde el intento de registro de la cuenta, que pueden incluir las credenciales propuestas del usuario (tales como una contraseña)","source":"nvd"}],"published":"2021-04-01T21:15:14.000Z","modified":"2026-07-08T06:27:33.519Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:N","score":3.7,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:N","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:N","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:N/A:N","score":2.6,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:S/C:P/I:N/A:N","score":3.5,"rating":"LOW"}],"cwes":["CWE-201","CWE-209"],"affected":[{"ranges":[{"version":"< 3.1.2","status":"affected"}],"vendor":"ubernostrum","product":"django-registration","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.2"}],"ecosystem":"PyPI","package":"django-registration","purl":"pkg:pypi/django-registration","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.1.2"}],"vendor":"django-registration_project","product":"django-registration","cpe":"cpe:2.3:a:django-registration_project:django-registration:*:*:*:*:*:django:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.2"}],"ecosystem":"PyPI","package":"django-registration","purl":"pkg:pypi/django-registration","source":"pysec"}],"references":[{"url":"https://github.com/ubernostrum/django-registration/security/advisories/GHSA-58c7-px5v-82hh","tags":["advisory","mitigation","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21416","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ubernostrum/django-registration/commit/2db0bb7ec35636ea46b07b146328b87b2cb13ca5","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django-registration/PYSEC-2021-11.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ubernostrum/django-registration","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-21416","url":"https://www.cve.org/CVERecord?id=CVE-2021-21416","licence":"CVE Terms of Use","modified":"2024-08-03T18:09:16.086Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-58c7-px5v-82hh","url":"https://github.com/advisories/GHSA-58c7-px5v-82hh","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:33.519Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-21416","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21416","licence":"Public domain","modified":"2026-06-17T03:35:31.983Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-11","url":"https://osv.dev/vulnerability/PYSEC-2021-11","licence":"CC-BY-4.0","modified":"2023-11-08T04:04:45.212Z"}],"updatedAt":"2026-11-25T22:58:00.556Z","epss":{"score":0.0041,"percentile":0.37363,"date":"2026-12-01T12:00:22.000Z"}}