# CVE-2026-40351: FastGPT: NoSQL Injection in loginByPassword leads to Authentication Bypass

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.64%, higher than 51% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-17T21:05:05.911Z
- Modified: 2026-10-26T22:10:00.163Z
- Weaknesses: CWE-943
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

FastGPT is an AI Agent building platform. In versions prior to 4.14.9.5, the password-based login endpoint uses TypeScript type assertion without runtime validation, allowing an unauthenticated attacker to pass a MongoDB query operator object (e.g., {"$ne": ""}) as the password field. This NoSQL injection bypasses the password check, enabling login as any user including the root administrator. This issue has been fixed in version 4.14.9.5.

(As written by CVE List.)

## Affected

- labring FastGPT: < 4.14.9.5
- fastgpt fastgpt: before 4.14.9.5

## References

- <https://github.com/labring/FastGPT/security/advisories/GHSA-x8mx-2mr7-h9xg> (exploit, mitigation, vendor-advisory)
- <https://github.com/labring/FastGPT/commit/bd966d479fbe414d02679cf79f9eaaab3d100a2d> (patch)
- <https://github.com/labring/FastGPT/releases/tag/v4.14.9.5> (product, release-notes)

## Sources

- CVE List: [CVE-2026-40351](https://www.cve.org/CVERecord?id=CVE-2026-40351), CVE Terms of Use, modified 2026-04-20
- NVD: [CVE-2026-40351](https://nvd.nist.gov/vuln/detail/CVE-2026-40351), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-40351 · Whole record: https://cve.day/CVE-2026-40351.json · Rebuilt by cve.day 2026-11-25T22:59:18.973Z
