django-haystack more_like_this Template Tag elasticsearch_backend.py _to_python eval injection
What fixes it
- 3.4.0django-haystack, PyPIOSV
pip install "django-haystack>=3.4.0"
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
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.
Text from CVE List
Affected versions 53
- django-haystackaffected: 3.0CVE List
- django-haystackaffected: 3.1CVE List
- django-haystackaffected: 3.2CVE List
- django-haystackaffected: 3.3.0CVE List
- django-haystackunaffected: 3.4.0CVE List
- django-haystack, PyPIfrom first release, fixed in 3.4.0OSV
- django-haystack, PyPI1.0.0-finalOSV
- django-haystack, PyPI1.0.0-rc1OSV
- django-haystack, PyPI1.0.0bOSV
- django-haystack, PyPI1.0.1-finalOSV
- django-haystack, PyPI1.0.2-finalOSV
- django-haystack, PyPI1.1.0OSV
- django-haystack, PyPI1.2.0OSV
- django-haystack, PyPI1.2.1OSV
- django-haystack, PyPI1.2.2OSV
- django-haystack, PyPI1.2.3OSV
- django-haystack, PyPI1.2.4OSV
- django-haystack, PyPI1.2.5OSV
- django-haystack, PyPI1.2.6OSV
- django-haystack, PyPI1.2.7OSV
- django-haystack, PyPI2.0.0OSV
- django-haystack, PyPI2.1.0OSV
- django-haystack, PyPI2.2.0OSV
- django-haystack, PyPI2.2.1OSV
- django-haystack, PyPI2.3.0OSV
- django-haystack, PyPI2.3.1OSV
- django-haystack, PyPI2.3.2OSV
- django-haystack, PyPI2.4.0OSV
- django-haystack, PyPI2.4.0rc1OSV
- django-haystack, PyPI2.4.0rc2OSV
- django-haystack, PyPI2.4.1OSV
- django-haystack, PyPI2.5.0OSV
- django-haystack, PyPI2.5.1OSV
- django-haystack, PyPI2.5.dev0OSV
- django-haystack, PyPI2.5.dev1OSV
- django-haystack, PyPI2.5.dev2OSV
- django-haystack, PyPI2.6.0OSV
- django-haystack, PyPI2.6.1OSV
- django-haystack, PyPI2.7.0OSV
- django-haystack, PyPI2.7.dev0OSV
- django-haystack, PyPI2.7.dev1OSV
- django-haystack, PyPI2.8.0OSV
- django-haystack, PyPI2.8.1OSV
- django-haystack, PyPI3.0OSV
- django-haystack, PyPI3.0b1OSV
- django-haystack, PyPI3.0b2OSV
- django-haystack, PyPI3.1.0OSV
- django-haystack, PyPI3.1.1OSV
- django-haystack, PyPI3.2.0OSV
- django-haystack, PyPI3.2.1OSV
- django-haystack, PyPI3.2.dev0OSV
- django-haystack, PyPI3.3.0OSV
- django-haystack, PyPI3.3b2OSV
References 8
- github.com/django-haystack/django-haystack/commit/eb05f193c9771a68dcc8cfac6674a0d48a52ee9dFixvia CVE List
- github.com/django-haystack/django-haystack/releases/tag/v3.4.0Fixvia CVE List
- vuldb.com/cve/CVE-2026-105315Advisoryvia CVE List
- vuldb.com/submit/978642Advisoryvia CVE List
- github.com/django-haystack/django-haystack/security/advisories/GHSA-r3hx-x5rh-p9vvExploitvia CVE List
- vuldb.com/vuln/413523Referencevia CVE List
- vuldb.com/vuln/413523/ctiReferencevia CVE List
- github.com/django-haystack/django-haystack/Referencevia CVE List