django-unicorn
Affected
- introduced
0, fixed0.67.0(ecosystem)
Fixed versions
0.67.0
Fix
- Fixed version
0.67.0pip install --upgrade django-unicorn==0.67.0
Advisory
Also known as: CVE-2026-31815, PYSEC-2026-2451
django-unicorn affected by component state manipulation via unvalidated attribute access
Summary
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.
Vulnerability Details: Component Access Control Bypass
Security analysis identified that the framework fails to enforce visibility boundaries defined by _is_public within the action parsers. Specifically, the logic in set_property_value() and _call_method_name() utilizes getattr and setattr directly on component instances without verifying if the target attribute or method is explicitly marked as public.
Vulnerability resides in:
src/django_unicorn/views/action_parsers/call_method.pysrc/django_unicorn/views/action_parsers/utils.pyWhile Django's template engine restricts rendering to registered directories, an unauthorized user can still 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.
Proof of Concept (PoC)
Attacker can overwrite the template_name attribute by sending a crafted JSON payload to the message endpoint:
{
"actionQueue": [
{
"type": "syncInput",
"payload": { "name": "template_name", "value": "admin/base.html" }
}
],
"data": {},
"meta": "<checksum_of_empty_dict>"
}
self.template_name = "admin/base.html".Impact
Low severity. The risk is limited to unauthorized manipulation of component state and rendering of existing templates within the application's configured template directories. Remote Code Execution (RCE) is not possible via this vector.
Medium Basis: The source's own band: MODERATE
0, fixed 0.67.0 (ecosystem)0.67.0
0.67.0pip install --upgrade django-unicorn==0.67.0Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0