CVE-2026-40351
JSON

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 packageVersionsReported by
labring FastGPT< 4.14.9.5CVE List
fastgpt fastgptbefore 4.14.9.5NVD

Classification

CWE-943

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

Sources

SourceRecordLicence
CVE ListCVE-2026-40351 changed 2026-04-20CVE Terms of Use
NVDCVE-2026-40351 changed 2026-10-26Public domain