Administrator access via password query operator injection
Published Apr 17, 2026 · Updated Apr 17, 2026
NoSQL injection in FastGPT before 4.14.9.5 allows remote attackers to authenticate as any user through the password login endpoint. loginByPassword passes the JSON password value directly into MongoUser.findOne after a compile-time-only TypeScript assertion, so a MongoDB $ne operator matches a stored nonempty password. No prior account or user interaction is required, but the request must supply a valid verification code; successful exploitation grants an administrator session when the root username is targeted.
Summary
What happened
NoSQL injection in FastGPT before 4.14.9.5 allows remote attackers to authenticate as any user through the password login endpoint. loginByPassword passes the JSON password value directly into MongoUser.findOne after a compile-time-only TypeScript assertion, so a MongoDB $ne operator matches a stored nonempty password. No prior account or user interaction is required, but the request must supply a valid verification code; successful exploitation grants an administrator session when the root username is targeted.
The record
- CVE
- CVE-2026-40351
- Published
- Apr 17, 2026
- Updated
- Apr 17, 2026
- Vendor
- Labring
- Product
- FastGPT
- Classifications
- CWE-943, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Apr 17, 2026CVE publishedPublication date reported by the CVE source.
- Apr 17, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 4.14.9.5
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- loginByPassword curl proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo