9.8critical
FastGPT: NoSQL Injection in loginByPassword leads to Authentication Bypass
- Severity
- 9.8critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.64% (higher than 51% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| labring FastGPT | < 4.14.9.5 | CVE List |
| fastgpt fastgpt | before 4.14.9.5 | NVD |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.
What each source says
CVE List
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.
NVD (es)
FastGPT es una plataforma de creación de agentes de IA. En versiones anteriores a la 4.14.9.5, el endpoint de inicio de sesión basado en contraseña utiliza la aserción de tipo de TypeScript sin validación en tiempo de ejecución, permitiendo a un atacante no autenticado pasar un objeto de operador de consulta de MongoDB (p. ej., {’$ne’: ’’}) como el campo de contraseña. Esta inyección NoSQL omite la verificación de contraseña, permitiendo el inicio de sesión como cualquier usuario, incluido el administrador raíz. Este problema ha sido solucionado en la versión 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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-40351 changed 2026-04-20 | CVE Terms of Use |
| NVD | CVE-2026-40351 changed 2026-10-26 | Public domain |