CVE-2026-105315: Improper Neutralization of Directives in Dynamically Evaluated Code in 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
Affected software
django-haystack
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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.