CVE-2026-7846: Langchain chatchat Langchain-Chatchat Has A Race Condition Vulnerability

LOW
Advisory Identifier: GHSA-x229-w2j4-h748
CVSS 2.6
CWE-362
Published
Advisory Summary

CVE-2026-7846 is a LOW (CVSS 2.6) langchain-chatchat has a race condition vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting Langchain chatchat libraries in the PyPI ecosystem. The issue involves langchain-chatchat has a race condition in its openai-compatible file upload api. Remediation is available in the latest vendor maintenance releases.

CVE-2026-7846 at a Glance

CVE Identifier CVE-2026-7846
GHSA Identifier GHSA-x229-w2j4-h748
Severity LOW
CVSS v3.1 Base Score 2.6
CWE Classification CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Affected Product Langchain chatchat
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 2.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Adjacent (AV:A)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-7846

To remediate this vulnerability, upgrade all affected Langchain chatchat dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

langchain-chatchat fixed: Latest secure release
pip install langchain-chatchat>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show langchain-chatchat

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-7846, inspect your installed packages using pip:

pip show langchain-chatchat

Analyze the terminal output to locate any version of Langchain chatchat in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show langchain-chatchat command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In Langchain chatchat, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A vulnerability has been found in chatchat-space Langchain-Chatchat up to 0.3.1.3. Impacted is the function files of the file libs/chatchat-server/chatchat/server/api_server/openai_routes.py of the component OpenAI-Compatible File Upload API. Such manipulation of the argument file.filename leads to time-of-check time-of-use. Access to the local network is required for this attack to succeed. The attack requires a high level of complexity. The exploitability is considered difficult. The exploit has been disclosed to the public and may be used. The project was informed of the problem early through an issue report but has not responded yet.

CVE-2026-7846 Affected Langchain chatchat Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
langchain-chatchat
PyPI
≤ 0.3.1.3

References

Frequently Asked Questions

What is CVE-2026-7846?
CVE-2026-7846 is a security vulnerability in Langchain chatchat involving Langchain-Chatchat has a Race Condition in its OpenAI-Compatible File Upload API under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition').
Which Langchain chatchat versions are affected?
Affected versions include releases prior to current release patches across affected packages: langchain-chatchat.
What version fixes CVE-2026-7846?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is langchain-chatchat affected?
Yes, langchain-chatchat is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-7846?
CVE-2026-7846 has a CVSS v3.1 base score of 2.6 (LOW) with vector string CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-7846?
CVE-2026-7846 is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') (The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.).
How can I check PyPI dependencies for CVE-2026-7846?
Run the dependency tree command: 'pip show langchain-chatchat'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x229-w2j4-h748",
  "modified" : "2026-05-08T22:17:33Z",
  "published" : "2026-05-05T18:33:26Z",
  "aliases" : [ "CVE-2026-7846" ],
  "summary" : "Langchain-Chatchat has a Race Condition in its OpenAI-Compatible File Upload API",
  "details" : "A vulnerability has been found in chatchat-space Langchain-Chatchat up to 0.3.1.3. Impacted is the function files of the file libs/chatchat-server/chatchat/server/api_server/openai_routes.py of the component OpenAI-Compatible File Upload API. Such manipulation of the argument file.filename leads to time-of-check time-of-use. Access to the local network is required for this attack to succeed. The attack requires a high level of complexity. The exploitability is considered difficult. The exploit has been disclosed to the public and may be used. The project was informed of the problem early through an issue report but has not responded yet.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:A/AC:H/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "langchain-chatchat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.3.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-7846"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/chatchat-space/Langchain-Chatchat/issues/5463"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/3em0/cve_repo/blob/main/Langchain-Chatchat/Vuln-2-Silent-File-Overwrite.md"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/chatchat-space/Langchain-Chatchat"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/submit/807795"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/vuln/361125"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/vuln/361125/cti"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-362" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-08T22:17:33Z",
    "nvd_published_at" : "2026-05-05T16:16:19Z"
  }
}