FastgptApplication

CVE-2026-40351

CRITICAL · 9.8 CVSS v3.1 Published 2026-04-17
Fix available
A fix is available. Upgrade to 4.14.9.5 or later.
See remediation →
100/100
Remediation priority · Urgent
Public exploit Remotely reachable No privileges Zero-click Patch available

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 · unedited
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.

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 confidence

FastGPT 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.

MitigationUpgrade 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.

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
FastgptApplication
Affected:< 4.14.9.5

CVSS 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 checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed FastGPT version
    Check 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.)
  2. Verify login endpoint is network accessible
    Confirm 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
  3. Inspect login handler for input validation
    Examine 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.
  4. Check MongoDB query construction method
    Review 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Upgrade available Upgrade to 4.14.9.5 or later
Fixed in 4.14.9.5
Vendor patch github.com →
Interim mitigation

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.

Recommended fix High confidence

4.14.9.5

  1. Identify the current FastGPT version currently deployed
  2. Create a complete backup of the MongoDB database to ensure data can be recovered if needed
  3. Upgrade FastGPT to version 4.14.9.5 or later by updating the deployment to the specified release
  4. After upgrade, verify the login endpoint no longer accepts MongoDB query operators (e.g., $ne, $gt) in the password field
  5. Test that normal authentication works correctly with valid credentials
  6. 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.

Fix this in Fastgpt Scoped from the published advisory
  • Consultation4.0 h
  • Implementation3.0 h
  • Testing4.0 h
  • Review / QA2.0 h
13.0 hours of engineering $2,300
Get the upgrade done

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 locally
dbcve dependency scanner

Check 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-40351 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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