CVE-2026-7845 Details
Description
A flaw has been found in chatchat-space Langchain-Chatchat up to 0.3.1.3. This issue affects the function PIL.Image.tobytes of the file libs/chatchat-server/chatchat/webui_pages/dialogue/dialogue.py of the component Vision Chat Paste Image Handler. This manipulation of the argument paste_image.image_data causes use of weak hash. The attacker needs to be present on the local network. The attack is considered to have high complexity. The exploitability is assessed as difficult. The exploit has been published and may be used. The project was informed of the problem early through an issue report but has not responded yet.
A vulnerability exists in Langchain-Chatchat versions up to 0.3.1.3, specifically within the Vision Chat feature that processes pasted images. The issue arises because the application uses the PIL library's Image.tobytes() method to generate an MD5 hash for image filenames, relying solely on the raw pixel data. This approach ignores essential image metadata, such as dimensions and color information, creating a scenario where two visually distinct images can produce identical byte representations and hash values. As a result, an attacker on the same local network can overwrite a victim's image file, leading to incorrect responses from the language model during chat interactions.
Update the image handling code to use a hashing method that incorporates the complete PNG byte stream, including all metadata, and switch from MD5 to SHA-256 to mitigate collision risks.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed May 5, 2026CISA-ADP
Assessed May 5, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/chatchat-space/Langchain-Chatchat/issues/5462 | CISA-ADP | Issue TrackingTechnical DescriptionVendor |
| https://github.com/3em0/cve_repo/blob/main/Langchain-Chatchat/Vuln-1-tobytes-Hash-Collision.md | [email protected] | ExploitTechnical Analysis |
| https://github.com/chatchat-space/Langchain-Chatchat/ | [email protected] | Vendor |
| https://github.com/chatchat-space/Langchain-Chatchat/issues/5462 | [email protected] | Issue TrackingTechnical DescriptionVendor |
| https://vuldb.com/submit/807794 | [email protected] | Permission Required |
| https://vuldb.com/vuln/361124 | [email protected] | AdvisoryPermission Required |
| https://vuldb.com/vuln/361124/cti | [email protected] | AdvisoryPermission Required |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-327 | Use of a Broken or Risky Cryptographic Algorithm | [email protected] |
| CWE-328 | Use of Weak Hash | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| chatchat-space Langchain-Chatchat | All versions |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 5, 2026 | CVE Modified | CISA-ADP |
| May 5, 2026 | New CVE Received | [email protected] |
Volerion