CVE-2026-40351: FastGPT: NoSQL Injection in Password Login Enables Authentication Bypass
FastGPT versions before 4.14.9.5 let an unauthenticated attacker bypass the password check on the password-based login endpoint through a NoSQL injection, because the input is not validated at runtime. The record reports a CVSS 3.1 score of 9.8 and that an attacker could log in as any user, including the root administrator. The sources consulted do not confirm exploitation in the wild, and the fix is available in 4.14.9.5.
Overview
FastGPT is an AI Agent building platform. According to the GitHub Security Advisory, its password-based login endpoint relies on a TypeScript type assertion without runtime validation. This allows a non-string value to reach the database query, which is classified as NoSQL injection (CWE-943).
Impact
The record describes an unauthenticated attacker bypassing the password check and logging in as any user, including the root administrator. The CVSS 3.1 base score is 9.8 with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, which indicates network reachability, low complexity, no privileges and no user interaction, with high confidentiality, integrity and availability impact.
Affected products and versions
- FastGPT (listed as Fastgpt Fastgpt and Labring FastGPT) in versions before 4.14.9.5.
- The fixed version is 4.14.9.5, according to the record.
Versions older than 4.14.9.5 should be treated as affected. The record does not list other intermediate versions.
Exploitation status
CISA KEV does not list this CVE, and the record shows no confirmed active exploitation. The SSVC data in the record rates exploitation as proof-of-concept and automatable, and one reference is tagged as exploit-related. These indicators suggest that public technical material may exist, but the sources consulted do not confirm exploitation in the wild.
Remediation and mitigation
- Upgrade FastGPT to version 4.14.9.5 or later, as recommended by the vendor's patch and release materials.
- Until the upgrade is applied, restrict access to the login endpoint to trusted networks where operationally possible, and review the vendor advisory for any additional mitigation it describes.
- After patching, review administrator and user accounts for unexpected sessions or changes, and rotate credentials for privileged accounts if compromise is suspected.
Detection guidance
- Review authentication logs for successful logins to administrative accounts that do not match expected users, times or source addresses.
- Look for login requests where the password field arrives in a non-text format, as this is the characteristic of the described flaw.
- Correlate unusual login activity with subsequent changes to user roles, data or configuration.
Limitations of the available information
The record does not provide a CWE name, a detailed technical root-cause analysis, or information on the number of deployments exposed. The EPSS data is present (probability 0.00597, percentile 0.47909), but its date field is not consistent with the publication date and should be interpreted with care. No additional sources beyond the listed references were consulted.
Frequently asked questions
What is the vulnerability in FastGPT CVE-2026-40351?
The password-based login endpoint does not validate input at runtime, so a NoSQL query operator object can be sent in the password field and bypass the password check.
Which versions are affected?
According to the record, versions before 4.14.9.5 are affected, and the fix is available in 4.14.9.5.
Is this vulnerability being actively exploited?
CISA KEV does not list this CVE, and the sources consulted do not confirm active exploitation in the wild.
This analysis was drafted with AI assistance from verified source data and automatically checked against it.