django-unicorn affected by component state manipulation via unvalidated attribute access
Description
Unicorn adds modern reactive component functionality to your Django templates. Prior to 0.67.0, component state manipulation is possible in django-unicorn due to missing access control checks during property updates and method calls. An attacker can bypass the intended _is_public protection to modify internal attributes such as template_name or trigger protected methods. This vulnerability is fixed in 0.67.0.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Django Unicorn before 0.67.0 lacks access control on component property updates and method calls, allowing attackers to bypass _is_public protection and modify internal state.
Vulnerability
Overview
CVE-2026-31815 is an access control bypass in django-unicorn, a reactive component framework for Django. Prior to version 0.67.0, the framework fails to enforce visibility boundaries defined by the _is_public attribute during property updates and method calls. Specifically, the functions set_property_value() and _call_method_name() in the action parsers use getattr and setattr directly on component instances without verifying whether the target attribute or method is explicitly marked as public [1][3]. This allows an attacker to bypass the intended protection and modify internal attributes or invoke protected methods.
Exploitation
An attacker can exploit this vulnerability by sending a crafted JSON payload to the component's message endpoint. For example, a syncInput action can overwrite the template_name attribute with a value like "admin/base.html". The server-side component then updates its internal state, and subsequent re-rendering displays the content of the targeted template [3]. No special privileges are required beyond network access to the application; any user who can interact with a Unicorn component can attempt this attack.
Impact
The impact is limited to unauthorized manipulation of component state and rendering of existing templates within the application's configured template directories. An attacker could force a component to render sensitive templates (e.g., admin layouts) from other installed applications or reset the component state by invoking the internal reset() method. Remote Code Execution (RCE) is not possible via this vector, and the severity is considered low [3].
Mitigation
The vulnerability is fixed in django-unicorn version 0.67.0. Users are strongly advised to upgrade to this version or later. No workarounds are documented; the fix enforces proper access control checks on all property updates and method calls [1][3].
AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
django-unicornPyPI | < 0.67.0 | 0.67.0 |
Affected products
2- Range: <0.67.0
- django-commons/django-unicornv5Range: < 0.67.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/advisories/GHSA-ffv6-jj46-x367ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-31815ghsaADVISORY
- github.com/django-commons/django-unicorn/security/advisories/GHSA-ffv6-jj46-x367ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.