CVE-2026-31815: Django unicorn Django-unicorn Affected By Component State Vulnerability
MODERATECVE-2026-31815 is a MODERATE (CVSS 5.3) django-unicorn affected by component state vulnerability (CWE-284: Improper Access Control) affecting Django unicorn libraries in the PyPI ecosystem. The issue involves django-unicorn affected by component state manipulation via unvalidated attribute access. Remediation is available by upgrading affected packages to version 0.67.0.
CVE-2026-31815 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2026-31815
To remediate this vulnerability, upgrade all affected Django unicorn dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install django-unicorn>=0.67.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show django-unicorn
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-31815, inspect your installed packages using pip:
pip show django-unicorn
Analyze the terminal output to locate any version of Django unicorn in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.67.0), your application is affected.
Note: The pip show django-unicorn command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Django unicorn, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-31815 Affected Django unicorn Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
django-unicorn
|
PyPI |
< 0.67.0
|
0.67.0
|
References
Frequently Asked Questions
What is CVE-2026-31815?
Which Django unicorn versions are affected?
What version fixes CVE-2026-31815?
Is django-unicorn affected?
What is the CVSS score of CVE-2026-31815?
What CWE is associated with CVE-2026-31815?
How can I check PyPI dependencies for CVE-2026-31815?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-ffv6-jj46-x367",
"modified" : "2026-03-11T05:45:51Z",
"published" : "2026-03-11T00:11:08Z",
"aliases" : [ "CVE-2026-31815" ],
"summary" : "django-unicorn affected by component state manipulation via unvalidated attribute access",
"details" : "## Summary\nComponent 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.\n\n## Vulnerability Details: Component Access Control Bypass\nSecurity 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.\n\nVulnerability resides in:\n- `src/django_unicorn/views/action_parsers/call_method.py`\n- `src/django_unicorn/views/action_parsers/utils.py`\n\nWhile 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.\n\n## Proof of Concept (PoC)\nAttacker can overwrite the `template_name` attribute by sending a crafted JSON payload to the message endpoint:\n\n1. Construct a payload targeting a protected attribute:\n ```json\n {\n \"actionQueue\": [\n {\n \"type\": \"syncInput\",\n \"payload\": { \"name\": \"template_name\", \"value\": \"admin/base.html\" }\n }\n ],\n \"data\": {},\n \"meta\": \"<checksum_of_empty_dict>\"\n }\n ```\n2. The server-side component updates its internal state: `self.template_name = \"admin/base.html\"`.\n3. Subsequent re-rendering displays the content of the targeted template, bypassing intended component logic.\n\n## Impact\nLow 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "django-unicorn"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.67.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/django-commons/django-unicorn/security/advisories/GHSA-ffv6-jj46-x367"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-31815"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/django-commons/django-unicorn"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284", "CWE-915" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-11T00:11:08Z",
"nvd_published_at" : "2026-03-10T22:16:19Z"
}
}