Bug 2545910 (CVE-2026-105315)

Summary: CVE-2026-105315 django-haystack: django-haystack: arbitrary code execution via unsafe evaluation of search results
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in django-haystack. This flaw allows a remote attacker to achieve arbitrary code execution on the hosting server by supplying crafted data to the search index. Due to improper input handling, the Elasticsearch backend unsafely evaluates raw search result values as executable code instead of treating them as plain data. When an application queries and processes these malicious results, the system executes the attacker-controlled commands with the privileges of the web application.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2546281, 2546282    
Bug Blocks:    

Description OSIDB Bzimport 2026-10-05 13:04:10 UTC
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.