# CVE-2026-31815: django-unicorn affected by component state manipulation via unvalidated attribute access

> Attackers can bypass access controls to modify internal component attributes or trigger protected methods in django-unicorn.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Mar 2026
- **Updated:** 11 Mar 2026
- **Also known as:** GHSA-ffv6-jj46-x367, PYSEC-2026-2451

## What is CVE-2026-31815?

CVE-2026-31815 is a medium-severity missing authorization vulnerability in django-commons django-unicorn, published on 10 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-915 (Improperly Controlled Modification of Dynamically-Determined Object Attributes), CWE-284 (Improper Access Control)

## Which versions are affected by CVE-2026-31815?

3 open source packages ship an affected version, including django-unicorn. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `django-unicorn` | PyPI | All versions | 0.67.0 |
| `django-unicorn` | PyPI | All versions | 0.67.0 |
| `django-unicorn` | PyPI | All versions | 0.67.0 |

Products: Django-Unicorn Unicorn.

## How do I fix CVE-2026-31815?

Upgrade django-unicorn to 0.67.0 or later.

## Is CVE-2026-31815 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-31815 exists.

## Other vulnerabilities in django-commons django-unicorn

- [CVE-2021-42134](https://insights.sbomify.com/CVE-2021-42134/): Cross-site Scripting in django-unicorn (medium 6.1)
- [CVE-2021-42053](https://insights.sbomify.com/CVE-2021-42053/): Cross-site scripting in Unicorn framework (medium 5.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-31815 and fix it if it is affected.

What it is: CVE-2026-31815 is a medium-severity missing authorization vulnerability in django-commons django-unicorn, published on 10 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-31815 exists.

Affected packages and fixed versions:
- django-unicorn (PyPI): affected all versions; fixed in 0.67.0
- django-unicorn (PyPI): affected all versions; fixed in 0.67.0
- django-unicorn (PyPI): affected all versions; fixed in 0.67.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-31815/ (Markdown: https://insights.sbomify.com/CVE-2026-31815/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-31815
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-31815
- OSV: https://osv.dev/vulnerability/CVE-2026-31815

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-31815/
Summaries are generated and may contain mistakes; the official description above is the record.
