Django@5.2.14

A high-level Python web framework that encourages rapid development and clean, pragmatic design.

  • latest version

    6.1.2

  • latest non vulnerable version

  • first published

    16 years ago

  • latest version published

    14 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the Django package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Memory Allocation with Excessive Size Value

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value due to the get_supported_language_variant() function in django/utils/translation/trans_real.py. An attacker can exhaust process memory by sending many distinct, very long language codes that are cached as lru_cache keys before the length check is applied. This can grow the in-memory cache with attacker-controlled values and degrade or crash a Django process handling requests that supply language codes.

    How to fix Memory Allocation with Excessive Size Value?

    Upgrade Django to version 5.2.18, 6.0.9, 6.1.2 or higher.

    [,5.2.18)[6.0a1,6.0.9)[6.1a1,6.1.2)
    • M
    Server-side Request Forgery (SSRF)

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the spatial lookup handling in django/contrib/gis/db/models/fields.py and django/contrib/gis/gdal/raster/source.py. An attacker can cause the Django process to make network requests by supplying attacker-controlled bytes to a raster lookup that is processed as a GDAL raster input. The vulnerable code accepts bytes in lookup contexts without requiring explicit GDALRaster wrapping, and GDAL can interpret that data as a VRT document referencing external raster sources. This lets an attacker trigger outbound file or network access while the lookup is being prepared, exposing the application to unintended requests made as the Django process user.

    How to fix Server-side Request Forgery (SSRF)?

    Upgrade Django to version 5.2.18, 6.0.9, 6.1.2 or higher.

    [,5.2.18)[6.0a1,6.0.9)[6.1a1,6.1.2)
    • M
    Authorization Bypass Through User-Controlled Key

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to Authorization Bypass Through User-Controlled Key through forged model formset submissions. An attacker can delete objects outside the formset’s limiting queryset by submitting POST data that supplies an editable primary key for a newly constructed instance and marks it for deletion. This lets an authenticated user with permission to submit the formset remove rows they are not authorized to target, while models with the default AutoField primary key are not affected.

    How to fix Authorization Bypass Through User-Controlled Key?

    Upgrade Django to version 5.2.18, 6.0.9, 6.1.2 or higher.

    [,5.2.18)[6.0a1,6.0.9)[6.1a1,6.1.2)
    • M
    Inefficient Algorithmic Complexity

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity due to quadratic-time parsing in django.utils.http.parse_header_parameters() within django/utils/http.py. An attacker can exhaust CPU by sending an unauthenticated request with an Accept or Content-Type header containing many separators inside a quoted parameter. This slows or stalls request processing in code paths such as HttpRequest.accepts(), degrading service for other users and making the application unresponsive under repeated malicious requests.

    How to fix Inefficient Algorithmic Complexity?

    Upgrade Django to version 5.2.18, 6.0.9, 6.1.2 or higher.

    [,5.2.18)[6.0a1,6.0.9)[6.1a1,6.1.2)
    • M
    Memory Allocation with Excessive Size Value

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value via the check_for_language function. An attacker can exhaust system memory by submitting numerous unique, excessively long language codes, which are stored as keys in an in-memory cache.

    Note: This is only exploitable if the set_language view is explicitly routed in the application.

    How to fix Memory Allocation with Excessive Size Value?

    Upgrade Django to version 5.2.17, 6.0.8, 6.1 or higher.

    [5.2,5.2.17)[6.0a1,6.0.8)[6.1a1,6.1)
    • L
    Cross-site Scripting (XSS)

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the display_for_field function. An attacker can execute arbitrary JavaScript code in the context of the admin interface by storing a URL with an unsafe scheme directly in the database, which is then rendered as a clickable link and clicked by a staff user.

    Note: This is only exploitable if data is persisted to the database without model validation, such as through direct queryset writes, deserialization, or bulk import of untrusted input.

    How to fix Cross-site Scripting (XSS)?

    Upgrade Django to version 5.2.17, 6.0.8, 6.1 or higher.

    [5.2,5.2.17)[6.0a1,6.0.8)[6.1a1,6.1)
    • H
    Uncontrolled Recursion

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to Uncontrolled Recursion via GEOSGeometry when parsing deeply nested GEOMETRYCOLLECTION objects provided as well-known text (WKT), well-known binary (WKB), or hex-encoded WKB. An attacker can cause unbounded recursion and trigger a segmentation fault in the underlying GEOS library by supplying maliciously crafted input through spatial field lookups or the GeometryField form field.

    How to fix Uncontrolled Recursion?

    Upgrade Django to version 5.2.17, 6.0.8, 6.1 or higher.

    [5.2,5.2.17)[6.0a1,6.0.8)[6.1a1,6.1)
    • H
    External Control of File Name or Path

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to External Control of File Name or Path via the GDALRaster constructor in spatial lookups. An attacker can write arbitrary files or trigger outbound network requests by supplying crafted input to spatial-field filters, potentially leading to remote code execution if a written file is later imported by the application.

    How to fix External Control of File Name or Path?

    Upgrade Django to version 5.2.17, 6.0.8, 6.1 or higher.

    [5.2,5.2.17)[6.0a1,6.0.8)[6.1a1,6.1)
    • L
    Use of Cache Containing Sensitive Information

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to Use of Cache Containing Sensitive Information in the UpdateCacheMiddleware and cache_page process when responses that vary on cookies are cached while the incoming request contains unrelated cookies. An attacker can access private data from the shared cache by making crafted requests that manipulate cookies.

    How to fix Use of Cache Containing Sensitive Information?

    Upgrade Django to version 5.2.16, 6.0.7 or higher.

    [,5.2.16)[6.0a1,6.0.7)
    • M
    Buffer Access with Incorrect Length Value

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to Buffer Access with Incorrect Length Value in the GDALRaster process when constructed from a bytes object. An attacker can access adjacent memory or cause service degradation by accessing the vsi_buffer property.

    How to fix Buffer Access with Incorrect Length Value?

    Upgrade Django to version 5.2.16, 6.0.7 or higher.

    [,5.2.16)[6.0a1,6.0.7)
    • M
    Improper Neutralization

    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

    Affected versions of this package are vulnerable to Improper Neutralization via the DomainNameValidator process. An attacker can inject arbitrary HTTP headers by submitting input containing newline characters, which may be included in HTTP responses if not properly sanitized.

    How to fix Improper Neutralization?

    Upgrade Django to version 5.2.16, 6.0.7 or higher.

    [,5.2.16)[6.0a1,6.0.7)
    • L
    Use of Cache Containing Sensitive Information

    Affected versions of this package are vulnerable to Use of Cache Containing Sensitive Information in the UpdateCacheMiddleware function. An attacker can access sensitive cached data by making unauthenticated requests to endpoints that have previously been accessed with an Authorization header, due to the absence of the Authorization value in the Vary response header.

    How to fix Use of Cache Containing Sensitive Information?

    Upgrade django to version 5.2.15, 6.0.6 or higher.

    [,5.2.15)[6.0a1,6.0.6)
    • L
    Incomplete Comparison with Missing Factors

    Affected versions of this package are vulnerable to Incomplete Comparison with Missing Factors in the has_vary_header function. An attacker can gain access to cached responses intended for other users by sending requests with whitespace-padded Vary header values.

    How to fix Incomplete Comparison with Missing Factors?

    Upgrade django to version 5.2.15, 6.0.6 or higher.

    [,5.2.15)[6.0a1,6.0.6)
    • L
    Improper Verification of Cryptographic Signature

    Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature in the get_signed_cookie function. An attacker can access data intended for a different context by crafting distinct (name, salt) pairs that result in the same concatenated value.

    How to fix Improper Verification of Cryptographic Signature?

    Upgrade django to version 5.2.15, 6.0.6 or higher.

    [,5.2.15)[6.0a1,6.0.6)
    • L
    Cleartext Transmission of Sensitive Information

    Affected versions of this package are vulnerable to Cleartext Transmission of Sensitive Information in the EmailBackend function when a failed STARTTLS handshake occurs and fail_silently=True is set. An attacker can intercept and read email content by performing a man-in-the-middle attack on the network connection.

    How to fix Cleartext Transmission of Sensitive Information?

    Upgrade django to version 5.2.15, 6.0.6 or higher.

    [,5.2.15)[6.0a1,6.0.6)
    • L
    Improper Handling of Case Sensitivity

    Affected versions of this package are vulnerable to Improper Handling of Case Sensitivity due to improper handling of Cache-Control directives in UpdateCacheMiddleware. An attacker can gain unauthorized access to sensitive response data by sending requests with uppercase or mixed-case Cache-Control values, causing private data to be cached and subsequently served to other users.

    How to fix Improper Handling of Case Sensitivity?

    Upgrade django to version 5.2.15, 6.0.6 or higher.

    [,5.2.15)[6.0a1,6.0.6)