Skip to main content

CVE-2026-105315: Improper Neutralization of Directives in Dynamically Evaluated Code in django-haystack

0
Medium
VulnerabilityCVE-2026-105315cvecve-2026-105315
Published: 10/05/2026 (10/05/2026, 12:45:13 UTC)
Source: CVE Database V5
Product: django-haystack

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.

CVSS v4.0

Score 5.1medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
High
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
Low
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

django-haystack

Affected versions
=3.0=3.1=3.2=3.3.0
django-haystack
pkg:pypi/django-haystack
Affected versions
=3.0=3.1=3.2=3.3.0
CPE configurations
cpe:2.3:a:django-haystack:django-haystack:*:*:*:*:*:*:*:*

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/05/2026, 13:18:30 UTC

Technical Analysis

The vulnerability exists in django-haystack versions 3.0 through 3.3.0 in the _to_python function of haystack/backends/elasticsearch_backend.py, specifically in the more_like_this Template Tag Handler. Improper neutralization of directives in dynamically evaluated code occurs due to manipulation of the result_class argument. This can be exploited remotely. A patch identified by commit eb05f193c9771a68dcc8cfac6674a0d48a52ee9d was introduced in version 3.4.0 to address the issue.

Potential Impact

Remote attackers can exploit this vulnerability to manipulate dynamically evaluated code, potentially leading to code injection or other unintended execution paths. The CVSS 4.0 base score is 5.1 (medium severity), indicating a moderate impact with network attack vector, low complexity, no privileges required, no user interaction, and low to limited impacts on confidentiality, integrity, and availability.

Mitigation Recommendations

Upgrade django-haystack to version 3.4.0 or later, which includes the official fix for this vulnerability. No other mitigation is indicated or required as the patch fully addresses the issue.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulDB
Date Reserved
2026-10-05T07:33:33.334Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ac3a0512cdf04f65600b114

Added to database: 10/05/2026, 13:04:17 UTC

Last enriched: 10/05/2026, 13:18:30 UTC

Last updated: 10/05/2026, 18:56:34 UTC

Views: 15

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses