Read the docs

Eval injection in django-haystack more_like_this template tag

Priority MEDIUM 56CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
High
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
Low · Low · Low
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-94.

Summary

django-haystack versions from 3.0 before 3.4.0 are affected. The _to_python function in the Elasticsearch backend does not neutralize directives in code it evaluates, so the result_class argument of the more_like_this template tag can inject code (CWE-95). A remote attacker with high privileges can exploit this, and a public exploit is referenced.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

Description from the CNA

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00254 17th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by the CNA
Fix Fixed django-haystack: 3.4.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
—django-haystack3.0; 3.1; 3.2; 3.3.03.4.0Patch availableCNA
  • django-haystack Vendor— Affected 3.0; 3.1; 3.2; 3.3.0 Fixed in 3.4.0 Patch available CNA

CPE names CNA · 1

CPEVersionsRoleVendor
cpe:2.3:a:django-haystack:django-haystack:*:*:*:*:*:*:*:*———
  • cpe:2.3:a:django-haystack:django-haystack:*:*:*:*:*:*:*:* Versions — — ·—

Remediation

Upgrade django-haystack to version 3.4.0, which fixes this issue (patch eb05f193c9771a68dcc8cfac6674a0d48a52ee9d).

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

  • Fix · CNA django-haystack Fixed in 3.4.0

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-05 Threatist record created from CVE-2026-105315
  2. 2026-10-05 Alias added: GHSA-5x9v-pqqg-p8jg
  3. 2026-10-06 Affected versions changed · Red Hat
  4. 2026-10-06 CVSS score added · Red Hat

References

Sources