CVE-2026-40351
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedFastGPT 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceFastGPT versions prior to 4.14.9.5 have a NoSQL injection vulnerability in the password-based login endpoint. The application uses TypeScript type assertions without runtime input validation, allowing attackers to inject MongoDB query operators (e.g., {'$ne': ''}) as the password field value. This manipulates the MongoDB query logic to bypass authentication and gain unauthorized access to any user account, including the root administrator.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 4.14.9.5CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify installed FastGPT versionCheck the package.json file, Docker image tag, or run `docker ps` to view the container image version. Alternatively, check the application's /api/version endpoint if available.Affected if The installed version is earlier than 4.14.9.5 (e.g., 4.14.9.4, 4.14.8, etc.)
-
Verify login endpoint is network accessibleConfirm the FastGPT web interface or API login endpoint (typically /api/user/login or similar) is exposed to network traffic. Check firewall rules and reverse proxy configuration.Affected if The login endpoint is accessible from untrusted networks without additional authentication barriers
-
Inspect login handler for input validationExamine the source code of the user authentication handler (typically in src/api/user/login.ts or similar). Look for direct use of user-provided password in MongoDB queries without runtime type checking.Affected if The code passes the password field directly to MongoDB queries without sanitizing MongoDB operators like $ne, $gt, $regex, etc.
-
Check MongoDB query construction methodReview how the login query is built. Look for patterns where req.body.password is used directly in find/findOne queries without validation.Affected if The password parameter is used in MongoDB queries without type validation or operator filtering
You are affected if your FastGPT version is earlier than 4.14.9.5 AND the login endpoint accepts arbitrary JSON objects in the password field, allowing MongoDB operators to be injected.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped4.14.9.5
Upgrade FastGPT to version 4.14.9.5 or later. Additionally, implement proper input validation with runtime type checking and use parameterized queries to prevent NoSQL injection attacks.
4.14.9.5
- Identify the current FastGPT version currently deployed
- Create a complete backup of the MongoDB database to ensure data can be recovered if needed
- Upgrade FastGPT to version 4.14.9.5 or later by updating the deployment to the specified release
- After upgrade, verify the login endpoint no longer accepts MongoDB query operators (e.g., $ne, $gt) in the password field
- Test that normal authentication works correctly with valid credentials
- Confirm the NoSQL injection vulnerability is remediated by attempting login with a query operator object and verifying it fails
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation3.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,680.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-40351 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-40351 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data