All vulnerabilities
CVE-2026-105315GHSA-r3hx-x5rh-p9vv

django-haystack more_like_this Template Tag elasticsearch_backend.py _to_python eval injection

n/a django-haystackPyPIFrameworks
CVSS
5.1Medium
ExploitationPublic exploit codeCISA's assessment says proof of concept code is public, assessed 5 Oct 2026. Not in the KEV catalogCISA via CVE List
Exploit odds (EPSS)0.25%Chance of exploitation activity in the next 30 days, higher than 16% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in3.4.0Fixed versionOSV
Published5 Oct 2026Updated 6 Oct 2026CVE List

What fixes it

  • 3.4.0django-haystack, PyPIOSVpip 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