CVE-2026-7845: chatchat-space Langchain-Chatchat weak hash in Vision Chat Paste Image Handler

CVE-2026-7845 · Severity: low · CVSS 3.1 · Published 2026-05-05

Langchain-Chatchat is an application framework used to build AI-powered chat systems using large language models. A security flaw in how the system handles pasted images allows for potential data manipulation because the software uses a weak method to identify and distinguish between different images. This could allow an attacker to cause the system to confuse one image with another, potentially leading to incorrect data processing or unauthorized file overwrites.

Technologies: Chatchat-Space Langchain-Chatchat, langchain-chatchat (PyPI). Vendors: Chatchat-Space, PyPI.

Quick answers

Is CVE-2026-7845 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-7845 being exploited in the wild.
How severe is CVE-2026-7845?
Low severity, with a CVSS score of 3.1, published 5 May 2026.
Which products and versions are affected?
Chatchat-Space Langchain-Chatchat up to 0.3.1.3; langchain-chatchat (PyPI) ECOSYSTEM:introduced=0,last_affected=0.3.1.3.
Is there a fix for CVE-2026-7845?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-7845 attacked?
It is attacked over the network or from the adjacent network, in a software library.
Am I affected by CVE-2026-7845?
Check whether you run Chatchat-Space Langchain-Chatchat or langchain-chatchat (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A vulnerability exists in the Vision Chat Paste Image Handler of Langchain-Chatchat (up to version 0.3.1.3) within the `libs/chatchat-server/chatchat/webui_pages/dialogue/dialogue.py` file. The root cause is the use of `PIL.Image.tobytes()` to generate image data for hashing, which strips critical metadata such as PNG color palettes. This allows an attacker to construct two different images that produce the same hash (a hash collision). An attacker with local network access and low privileges can exploit this to cause file overwrites or manipulate the dialogue history. The attack is considered high complexity due to the requirements for constructing specific colliding image pairs and potential race conditions. As of the advisory date, no official patch has been released.

Affected products

  • chatchat-space Langchain-Chatchat up to 0.3.1.3

Identifiers

  • CVE-2026-7845
  • GHSA-wmvv-fhm6-w34x
  • PYSEC-2026-2558

Timeline

  • 2026-05-05: disclosed: Vulnerability reported via GitHub issue and VulDB
  • 2026-05-05: advisory: CVE-2026-7845 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.