Skip to content
OpenAdvisories
Medium · 4.7 CVE-2026-105315 EUVD-2026-92429GHSA-5x9v-pqqg-p8jgGHSA-r3hx-x5rh-p9vv

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

Published Oct 5, 2026 · Updated Oct 5, 2026 · 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.

Affected products

VendorProductAffectedFixed
— 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.

ReleasePackageFixed inAdvisory
Debian 14 django-haystack No fix yet —
Debian 13 django-haystack No fix yet —
Debian 12 django-haystack No fix yet —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS django-haystack No fix yet —
Ubuntu 16.04 LTS django-haystack No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI django-haystack < 3.4.0 3.4.0 GHSA-r3hx-x5rh-p9vv

References