Potential sensitive information disclosed in error reports
django-registration is a user-registration application for Django.
Impact
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 the following conditions:
- 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
- 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).
Patches
As 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.
Note 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).
Workarounds
Users 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:
from django.utils.decorators import method_decorator
from django.views.decorators.debug import sensitive_post_parameters
from django_registration.views import RegistrationView
class MyRegistrationView(RegistrationView):
"""
A RegistrationView subclass manually protected against sensitive information disclosure
in error reports.
"""
@method_decorator(sensitive_post_parameters())
def dispatch(self, *args, **kwargs):
return super().dispatch(*args, **kwargs)
References
- Django's documentation on error reporting in production
- How Django's sensitive-data filters work
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Python (PyPI) | django-registration | < 3.1.2 | 3.1.2 |
Odnośniki
- https://github.com/ubernostrum/django-registration/security/advisories/GHSA-58c7-px5v-82hh
- https://nvd.nist.gov/vuln/detail/CVE-2021-21416
- https://github.com/ubernostrum/django-registration/commit/2db0bb7ec35636ea46b07b146328b87b2cb13ca5
- https://github.com/pypa/advisory-database/tree/main/vulns/django-registration/PYSEC-2021-11.yaml
- https://github.com/ubernostrum/django-registration
- Wektor CVSS
CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:N- Słabość (CWE)
CWE-201, CWE-209- Platforma
- Python (PyPI)
- Paczka
django-registration- Ujawniono
- 01.04.2021
- Aktualizacja
- 11.10.2026 13:19
Źródła i licencje
OSV / GitHub Advisory Database - PYSEC-2021-11 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-58c7-px5v-82hh - CC BY 4.0
Historia podatności: django-registration
Wszystkie opisane podatności tej paczki (Python (PyPI)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
To jedyna znana podatność tej paczki.
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.