{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:fastgpt:fastgpt:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "4.14.9.5"
              }
            ],
            "source": [
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "d0f96723ea5f50ced1b9d93916c984b15539c746"
            },
            {
              "fixed": "bd966d479fbe414d02679cf79f9eaaab3d100a2d"
            }
          ],
          "repo": "https://github.com/labring/fastgpt",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-x8mx-2mr7-h9xg"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-943"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40351.json"
  },
  "details": "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.",
  "id": "CVE-2026-40351",
  "modified": "2026-07-08T05:37:42.983791452Z",
  "published": "2026-04-17T21:05:05.911Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/labring/FastGPT/releases/tag/v4.14.9.5"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40351.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/labring/FastGPT/security/advisories/GHSA-x8mx-2mr7-h9xg"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40351"
    },
    {
      "type": "FIX",
      "url": "https://github.com/labring/FastGPT/commit/bd966d479fbe414d02679cf79f9eaaab3d100a2d"
    }
  ],
  "schema_version": "1.7.5",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "FastGPT: NoSQL Injection in loginByPassword leads to Authentication Bypass"
}