Django Patches XSS and Admin Data Leak in December Security Update

Django has patched seven vulnerabilities, including an XSS flaw and an admin information leak that a researcher used to recover a test administrator’s stored password hash in controlled testing. Versions 6.1.4, 6.0.11 and 5.2.20 contain the fixes. Exploitation depends on specific rendering patterns or administrative permissions and model relationships.
Django Patches XSS and Admin Data Leak in December Security Update
Table of Contents
    Add a header to begin generating the table of contents

    Django has released security updates addressing seven vulnerabilities, including a cross-site scripting flaw in an HTML truncation filter and an information disclosure issue in the framework’s administrative interface.

    In responses to Daily Security Review, the researcher said controlled testing of the admin vulnerability demonstrated recovery of a test administrator’s complete stored password hash. The account used for testing had limited viewing permissions and lacked direct access to the related authentication user model.

    The researcher said neither vulnerability had been observed being exploited in the wild during the investigation. That statement reflects the researcher’s observations and does not establish whether exploitation has occurred elsewhere.

    Affected Django Versions and Severity Ratings

    Both vulnerabilities affect the following supported release branches:

    Django branchAffected versionsFixed version
    6.1Versions before 6.1.46.1.4
    6.0Versions before 6.0.116.0.11
    5.2Versions before 5.2.205.2.20

    The official CVE records state that earlier, unsupported series, including Django 5.1, 5.0 and 4.2, were not evaluated and may also be affected. Their omission from the supported-version list should therefore not be interpreted as confirmation that they are unaffected.

    CVE-2026-115868: XSS in HTML Truncation

    The XSS vulnerability affects Django’s truncatechars_html template filter and the underlying django.utils.text.Truncator.chars() method when called with html=True.

    The affected functionality shortens HTML content while preserving its markup structure. According to the official vulnerability description, a potential XSS condition arises when certain inputs have a text length that matches the requested truncation length and the processed output is rendered inside an HTML attribute.

    In the researcher’s explanation, inconsistent escaping at that boundary can allow attacker-controlled content to escape its intended attribute context. Because the filter’s output is marked safe, automatic template escaping does not provide an additional safeguard in that rendering path.

    The CVSS 4.0 vector specifies no required attacker privileges but includes active user interaction. The documented issue concerns script execution in a browser; it does not establish server-side remote code execution.

    Asked about exposure in production environments, the researcher identified rich-text previews, summaries, dynamic attributes and tooltips as relevant application patterns. However, no statistically representative study had been conducted to determine how frequently the specific vulnerable pattern appears in deployed Django applications.

    A complete minimal reproduction was not supplied in the response. The researcher said the exact input, truncation length and template would first need to be checked against the original testing artifacts. Daily Security Review has not independently reproduced the exploit.

    CVE-2026-119642: Admin Filtering Exposes Related Data

    The second vulnerability concerns how Django’s administrative changelist validates database lookups containing pk, the framework’s alias for a model’s primary key.

    Django’s object-relational mapper understands that alias, but the administrative validation function, ModelAdmin.lookup_allowed(), did not consistently resolve it before checking the lookup path. In affected model configurations, this allowed filtering against related fields that should have been restricted.

    The relevant relationships involve a custom OneToOneField primary key or multi-table inheritance. Django notes that multi-table inheritance creates an implicit OneToOneField primary key, making those models affected by default when the other access conditions are met. The advisory identifies the vulnerability as a special case of the earlier CVE-2010-4534.

    Exploitation requires an authenticated staff account with view permission on an affected registered model, access to its administrative changelist, and sufficient knowledge of the related model’s fields.

    What Laboratory Testing Demonstrated

    In the account provided to Daily Security Review, a restricted staff user successfully bypassed the intended lookup restrictions, identified a test account’s superuser status and recovered a test administrator’s complete stored password hash.

    The reported results were obtained in a laboratory environment using test accounts. Daily Security Review has not independently reproduced the password-hash recovery.

    The researcher explicitly distinguished those results from other possible consequences. Exposure of email addresses, authentication-related tokens, personally identifiable information and other confidential fields would depend on the application’s schema and accessible relationships. Those categories were described as potential impacts, rather than confirmed experimental results.

    “Recovery of a test password hash does not, by itself, establish plaintext password recovery or successful account takeover,” the researcher said.

    Disclosure and Patch Contributions

    The official CVE timelines record initial reports for both vulnerabilities on October 15, 2026. Django confirmed the admin information leak on October 30 and the XSS issue on November 9, before issuing the December 2 security release.

    The records credit Jake Howard with developing the XSS remediation, with reviews by Sarah Boyce and Jacob Walls. Jacob Walls developed the admin fix, reviewed by Sarah Boyce.

    Explaining the research approach, JoeCyberTech said the investigation focused on boundary conditions and inconsistencies between framework components, particularly where input processing and authorization decisions meet.

    Other Fixes in the Security Release

    The same update addresses five additional vulnerabilities:

    • CVE-2026-124827: A High-severity server-side file-write issue involving RasterField, with possible remote code execution depending on the raster driver.
    • CVE-2026-132092: High-severity potential SQL injection in certain range and in lookups.
    • CVE-2026-125673: Low-severity potential cache poisoning involving dot segments in request paths.
    • CVE-2026-127929: A separate Low-severity admin information leak through reverse relations.
    • CVE-2026-132809: A Low-severity heap buffer overflow involving OGRGeometry.wkb.

    Recommended Actions for Django Administrators

    Organizations should install the patched release for their supported Django branch or a subsequent patched version.

    The researcher additionally recommends reviewing templates that place HTML-producing filter output inside attributes, auditing admin models that use OneToOneField primary keys or multi-table inheritance, and reassessing staff permissions.

    Other recommendations include monitoring administrative access logs for unusual or repetitive filtering and incorporating boundary-condition and authorization tests into application security assessments. These checks supplement deployment of the fixes; their relevance depends on the application’s templates, model relationships and administrative access configuration.

    Related Posts