{"id":"CVE-2026-64859","aliases":["CVE-2026-64859","GHSA-6x2c-phff-wx57","GO-2026-6240"],"related":[],"kind":"vulnerability","state":"published","title":"New API: User List API Leaks Root User Access Token Leading to Privilege Escalation","summary":"New API is a large language mode (LLM) gateway and artificial intelligence (AI) asset management system. Prior to 1.0.0-rc.7, the admin user list and user lookup APIs, including GET /api/user/, return User.AccessToken as access_token because User model objects are serialized after queries use Omit(\"password\"), allowing an authenticated administrator to obtain the root user's bearer token and access root-only system configuration APIs. This issue is fixed in version 1.0.0-rc.7.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"New API is a large language mode (LLM) gateway and artificial intelligence (AI) asset management system. Prior to 1.0.0-rc.7, the admin user list and user lookup APIs, including GET /api/user/, return User.AccessToken as access_token because User model objects are serialized after queries use Omit(\"password\"), allowing an authenticated administrator to obtain the root user's bearer token and access root-only system configuration APIs. This issue is fixed in version 1.0.0-rc.7.","source":"cvelist"},{"lang":"en","text":"## Vulnerability Information\n\n- **Product**: new-api\n- **Affected versions**: versions before `v1.0.0-rc.7` that serialize `User.AccessToken` as `access_token`; the issue was confirmed in `v0.12.14`\n- **Patched version**: `v1.0.0-rc.7`\n- **Fixed commit**: `0936e2504655a5cbf7bc3c388f6d3e2bb24916d3`\n- **Type**: Information Disclosure / Privilege Escalation\n\n## Description\n\nIn affected versions of new-api, the admin user list and user lookup APIs can return the `access_token` field for users, including the root user. An authenticated admin user can call endpoints such as `GET /api/user/` to retrieve user records. Because access tokens function as bearer credentials for API authentication, leaking the root user's access token allows an admin user to authenticate as root and access root-only endpoints such as system configuration APIs.\n\nThis bypasses the intended role boundary between admin users and the root user and can result in privilege escalation to full system control.\n\n## Root Cause\n\nThe `User.AccessToken` field was serialized as `json:\"access_token\"` in affected versions. User management APIs returned `User` model objects directly after omitting only the password field from database queries, so JSON serialization could include `access_token` in API responses.\n\nAffected code patterns include user list, user search, and user detail paths that use `Omit(\"password\")` without preventing `access_token` from being serialized.\n\n## Impact\n\n- An authenticated admin user may obtain the root user's access token.\n- The attacker may impersonate the root user and access root-only APIs.\n- The attacker may modify system settings, payment settings, OAuth/SMTP-related configuration, and other sensitive platform options.\n- Access tokens for other users may also be exposed, enabling user impersonation.\n\n## Remediation\n\nUpgrade to `v1.0.0-rc.7` or later. The fix changes `User.AccessToken` to use `json:\"-\"`, preventing the field from being serialized in API responses.\n\nOperators should also rotate any root or user access tokens that may have been exposed before upgrading, especially if untrusted admin users had access to user management APIs.","format":"markdown","source":"ghsa"},{"lang":"en","text":"New API: User List API Leaks Root User Access Token Leading to Privilege Escalation in github.com/QuantumNous/new-api","format":"markdown","source":"go"}],"published":"2026-08-17T15:42:18.557Z","modified":"2026-09-18T20:09:01.757Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-200"],"affected":[{"ranges":[{"version":"< 1.0.0-rc.7","status":"affected"}],"vendor":"QuantumNous","product":"new-api","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.0.0-rc.7"}],"ecosystem":"Go","package":"github.com/QuantumNous/new-api","purl":"pkg:golang/github.com/QuantumNous/new-api","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.0.0-rc.7"}],"ecosystem":"Go","package":"github.com/QuantumNous/new-api","purl":"pkg:golang/github.com/QuantumNous/new-api","source":"go"}],"references":[{"url":"https://github.com/QuantumNous/new-api/security/advisories/GHSA-6x2c-phff-wx57","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/QuantumNous/new-api/pull/4929","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/QuantumNous/new-api/commit/0936e2504655a5cbf7bc3c388f6d3e2bb24916d3","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/QuantumNous/new-api/releases/tag/v1.0.0-rc.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/QuantumNous/new-api","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-08-17T18:56:29.570Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-64859","url":"https://www.cve.org/CVERecord?id=CVE-2026-64859","licence":"CVE Terms of Use","modified":"2026-08-17T18:56:39.405Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6x2c-phff-wx57","url":"https://github.com/advisories/GHSA-6x2c-phff-wx57","licence":"CC-BY-4.0","modified":"2026-08-18T15:10:58.880Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6240","url":"https://pkg.go.dev/vuln/GO-2026-6240","licence":"CC-BY-4.0","modified":"2026-08-18T15:00:25.989Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-64859","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64859","licence":"Public domain","modified":"2026-09-18T20:09:01.757Z"}],"updatedAt":"2026-11-25T22:59:33.352Z","epss":{"score":0.00464,"percentile":0.41882,"date":"2026-12-01T12:00:22.000Z"}}