Vulnerability · Published Oct 5, 2026 · Assigned by VulDB
CVE-2026-105315django-haystack more_like_this Template Tag elasticsearch_backend.py _to_python eval injection
Medium 4.7
In plain English
A medium-severity code injection in django-haystack. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
A vulnerability has been found in django-haystack up to 3.3.0. Affected is the function _to_python of the file haystack/backends/elasticsearch_backend.py of the component more_like_this Template Tag Handler. Such manipulation of the argument result_class leads to improper neutralization of directives in dynamically evaluated code. The attack can be launched remotely. The exploit has been disclosed to the public and may be used. Upgrading to version 3.4.0 is able to address this issue. The name of the patch is eb05f193c9771a68dcc8cfac6674a0d48a52ee9d. It is suggested to upgrade the affected component.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | django-haystack | no fix listed | DEBIAN-CVE-2026-105315 |
| Debian:13 | django-haystack | no fix listed | DEBIAN-CVE-2026-105315 |
| Debian:14 | django-haystack | no fix listed | DEBIAN-CVE-2026-105315 |
| PyPI | django-haystack | 3.4.0 | GHSA-r3hx-x5rh-p9vv |
| Ubuntu:22.04:LTS | django-haystack | no fix listed | UBUNTU-CVE-2026-105315 |
| Ubuntu:24.04:LTS | django-haystack | no fix listed | UBUNTU-CVE-2026-105315 |
| Ubuntu:26.04:LTS | django-haystack | no fix listed | UBUNTU-CVE-2026-105315 |
| Ubuntu:26.10 | django-haystack | no fix listed | UBUNTU-CVE-2026-105315 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | django-haystack | 3.03.13.23.3.0 |
Weakness: CWE-95, CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C
References
- VDB-413523 | django-haystack more_like_this Template Tag elasticsearch_backend.py _to_python eval injection vdb-entry, technical-description
- VDB-413523 | CTI Indicators (IOB, IOC, IOA) signature, permissions-required
- CVE-2026-105315 | CVE Analysis and Report third-party-advisory
- Submit #978642 | django-haystack 3.3.0 Code Execution third-party-advisory
- https://github.com/django-haystack/django-haystack/security/advisories/GHSA-r3hx-x5rh-p9vv exploit
- https://github.com/django-haystack/django-haystack/commit/eb05f193c9771a68dcc8cfac6674a0d48a52ee9d patch
- https://github.com/django-haystack/django-haystack/releases/tag/v3.4.0 patch
- https://github.com/django-haystack/django-haystack/ product