# CVE-2026-105315: django-haystack more_like_this Template Tag elasticsearch_backend.py _to_python eval injection

- Severity: Medium 5.1 (CVSS:4.0, scored by VulDB) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 18% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-15T22:42:28.000Z
- Modified: 2026-10-06T15:04:52.637Z
- Also known as: GHSA-r3hx-x5rh-p9vv
- Weaknesses: CWE-94, CWE-95
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulDB

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

(As written by CVE List.)

## Affected

- django-haystack: 3.0; 3.1; 3.2; 3.3.0 (not affected: 3.4.0)
- django-haystack (PyPI): before 3.4.0

## Every score

- VulDB: CVSS:4.0 5.1 Medium `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`
- VulDB: CVSS:3.1 4.7 Medium `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`
- VulDB: CVSS:3.0 4.7 Medium `CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C`
- VulDB: CVSS:2.0 5.8 Medium `AV:N/AC:L/Au:M/C:P/I:P/A:P/E:POC/RL:OF/RC:C`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/django-haystack/django-haystack/security/advisories/GHSA-r3hx-x5rh-p9vv> (exploit, web)
- <https://vuldb.com/vuln/413523> (technical-description, vdb-entry)
- <https://vuldb.com/vuln/413523/cti> (permissions-required, signature)
- <https://vuldb.com/cve/CVE-2026-105315> (third-party-advisory)
- <https://vuldb.com/submit/978642> (third-party-advisory)
- <https://github.com/django-haystack/django-haystack/commit/eb05f193c9771a68dcc8cfac6674a0d48a52ee9d> (patch, web)
- <https://github.com/django-haystack/django-haystack/releases/tag/v3.4.0> (patch, web)
- <https://github.com/django-haystack/django-haystack/> (product)
- <https://github.com/django-haystack/django-haystack> (package)

## Sources

- CVE List: [CVE-2026-105315](https://www.cve.org/CVERecord?id=CVE-2026-105315), CVE Terms of Use, modified 2026-10-05
- GitHub Advisory Database: [GHSA-r3hx-x5rh-p9vv](https://github.com/advisories/GHSA-r3hx-x5rh-p9vv), CC-BY-4.0, modified 2026-10-06
- NVD: [CVE-2026-105315](https://nvd.nist.gov/vuln/detail/CVE-2026-105315), Public domain, modified 2026-10-06

---

Page: https://cve.day/CVE-2026-105315 · Whole record: https://cve.day/CVE-2026-105315.json · Rebuilt by cve.day 2026-11-25T22:59:42.120Z
