{"answers":{"affected":"2 open source packages ship an affected version, including django-haystack.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-105315 exists.","fix":"Upgrade django-haystack to 3.4.0 or later.","what":"CVE-2026-105315 is a medium-severity code injection vulnerability in django-haystack, published on 5 Oct 2026. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-105315 and fix it if it is affected.\n\nWhat it is: CVE-2026-105315 is a medium-severity code injection vulnerability in django-haystack, published on 5 Oct 2026. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-105315 exists.\n\nAffected packages and fixed versions:\n- django-haystack (PyPI): affected all versions; fixed in 3.4.0\n- django-haystack (PyPI): affected all versions; fixed in 3.4.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-105315/ (Markdown: https://insights.sbomify.com/CVE-2026-105315/index.md)","id":"CVE-2026-105315","markdown":"https://insights.sbomify.com/CVE-2026-105315/index.md","name":"CVE-2026-105315","record":{"aliases":["DEBIAN-CVE-2026-105315","GHSA-5x9v-pqqg-p8jg","GHSA-r3hx-x5rh-p9vv","UBUNTU-CVE-2026-105315"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Django search library","requires_auth":"high_privilege","summary":"Remote attackers can execute arbitrary code via the more_like_this template tag in django-haystack due to unsafe evaluation of the result_class argument.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"VulDB","cpe":[],"cvss":{"score":5.1,"severity":"medium","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":false,"headline":"django-haystack more_like_this Template Tag elasticsearch_backend.py _to_python eval injection","id":"CVE-2026-105315","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":2,"n_references":8,"next":{"headline":"Magee Shortcodes \u003c= 2.1.1 - Reflected XSS via live_preview and magee_create_shortcode Actions","id":"CVE-2026-105316"},"packages":[{"ecosystem":"PyPI","fixed":["3.4.0"],"introduced":["0"],"last_affected":[],"package":"django-haystack","purl":null,"source":"GHSA-r3hx-x5rh-p9vv"},{"ecosystem":"PyPI","fixed":["3.4.0"],"introduced":["0"],"last_affected":[],"package":"django-haystack","purl":"pkg:pypi/django-haystack","source":"GHSA-r3hx-x5rh-p9vv"}],"prev":{"headline":"Path traversal in Papermerge","id":"CVE-2026-105314"},"products":["django-haystack"],"published":"2026-10-05","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-10-05","vendors":["n/a"]},"summary":"Remote attackers can execute arbitrary code via the more_like_this template tag in django-haystack due to unsafe evaluation of the result_class argument.","url":"https://insights.sbomify.com/CVE-2026-105315/"}