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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | django-haystack | 3.0, 3.1, 3.2, 3.3.0 | 3.4.0 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | django-haystack | No fix yet | — |
| Debian 13 | django-haystack | No fix yet | — |
| Debian 12 | django-haystack | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | django-haystack | No fix yet | — |
| Ubuntu 26.04 LTS | django-haystack | No fix yet | — |
| Ubuntu 24.04 LTS | django-haystack | No fix yet | — |
| Ubuntu 22.04 LTS | django-haystack | No fix yet | — |
| Ubuntu 20.04 LTS | django-haystack | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | django-haystack | No fix yet | — |
| Ubuntu 16.04 LTS | django-haystack | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | django-haystack | < 3.4.0 | 3.4.0 | GHSA-r3hx-x5rh-p9vv |
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