Django@5.2.16

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)