Changes between Version 11 and Version 12 of SecurityTeam


Ignore:
Timestamp:
Nov 21, 2025, 6:15:37 AM (2 weeks ago)
Author:
Natalia Bidart
Comment:

Add common response for "lack of maximum length for passwords"

Legend:

Unmodified
Added
Removed
Modified
  • SecurityTeam

    v11 v12  
    4747Thanks for your understanding!
    4848
     49Kind regards, the Django Security Team.
     50
    4951=== Unsanitized user input ===
     52
    5053After review, we've determined that the reported issue only affects workflows that process user input without sanitization. As documented at [0]:
    5154
     
    5861Thanks for taking the time to submit it through the appropriate channel.
    5962
     63Kind regards, the Django Security Team.
     64
    6065=== Private API ===
     66
    6167After review, we've determined that the reported issue only affects direct usage of private, undocumented functionality. As documented at [0]:
    6268
     
    6874
    6975Thanks for taking the time to submit it through the appropriate channel.
     76
     77Kind regards, the Django Security Team.
    7078
    7179=== Security issue in the development server (runserver) ===
     
    8391Thanks for taking the time to submit it through the appropriate channel.
    8492
     93Kind regards, the Django Security Team.
     94
    8595[0] https://docs.djangoproject.com/en/stable/ref/django-admin/#django-admin-runserver
    86 
    8796[1] https://docs.djangoproject.com/en/stable/internals/security/#how-does-django-evaluate-a-report
    8897
     
    103112For further clarification, please see our documentation on performing raw SQL queries: https://docs.djangoproject.com/en/stable/topics/db/sql/#performing-raw-sql-queries
    104113
    105 Best,
    106 Django Security Team.
     114Kind regards, the Django Security Team.
     115
     116=== Maximum password validator (lack of) ==
     117
     118Thank you for your report. We reviewed the issue and do not consider it a security vulnerability.
     119
     120While it is true that extremely long passwords could, in theory, increase the cost of password hashing, Django applies a request body size limit [0], which defaults to 2.5 MB. In practice, this means passwords cannot exceed roughly 2.5 million characters.Django's built-in password hashers handle inputs of this size efficiently. On a regular desktop machine, hashing a 2.5 MB password takes on the order of a third of a second.
     121
     122For example, running the following plain Python script:
     123{{{#!python
     124import timeit
     125from django.contrib.auth.hashers import get_hasher
     126
     127hasher = get_hasher()
     128salt = hasher.salt()
     129password = "x" * 2_621_440  # ~2.5 MB
     130n = 5  # number of runs
     131total_seconds = timeit.timeit(lambda: hasher.encode(password, salt), number=n)avg_ms = (total_seconds / n) * 1000
     132
     133print(f"Average time: {avg_ms:.2f} ms over {n} runs")
     134}}}
     135Produces output such as: `Average time: 281.13 ms over 5 runs`
     136
     137Given these limits and performance characteristics, and noting that it is generally good practice to permit long and secure passwords, we do not consider any change necessary in Django itself.
     138
     139Kind regards, The Django Security Team.
     140
     141[0] https://docs.djangoproject.com/en/stable/ref/settings/#data-upload-max-memory-size
    107142
    108143=== Unauthenticated cache purge ===
Back to Top