GHSA-6X2C-PHFF-WX57
Vulnerability from github – Published: 2026-08-17 16:35 – Updated: 2026-08-17 16:35Vulnerability Information
- Product: new-api
- Affected versions: versions before
v1.0.0-rc.7that serializeUser.AccessTokenasaccess_token; the issue was confirmed inv0.12.14 - Patched version:
v1.0.0-rc.7 - Fixed commit:
0936e2504655a5cbf7bc3c388f6d3e2bb24916d3 - Type: Information Disclosure / Privilege Escalation
Description
In 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.
This bypasses the intended role boundary between admin users and the root user and can result in privilege escalation to full system control.
Root Cause
The 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.
Affected code patterns include user list, user search, and user detail paths that use Omit("password") without preventing access_token from being serialized.
Impact
- An authenticated admin user may obtain the root user's access token.
- The attacker may impersonate the root user and access root-only APIs.
- The attacker may modify system settings, payment settings, OAuth/SMTP-related configuration, and other sensitive platform options.
- Access tokens for other users may also be exposed, enabling user impersonation.
Remediation
Upgrade 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.
Operators 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.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/QuantumNous/new-api"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.0.0-rc.7"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-64859"
],
"database_specific": {
"cwe_ids": [
"CWE-200"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-17T16:35:50Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "## 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\u0027s 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\u0027s 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.",
"id": "GHSA-6x2c-phff-wx57",
"modified": "2026-08-17T16:35:50Z",
"published": "2026-08-17T16:35:50Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/QuantumNous/new-api/security/advisories/GHSA-6x2c-phff-wx57"
},
{
"type": "WEB",
"url": "https://github.com/QuantumNous/new-api/pull/4929"
},
{
"type": "WEB",
"url": "https://github.com/QuantumNous/new-api/commit/0936e2504655a5cbf7bc3c388f6d3e2bb24916d3"
},
{
"type": "PACKAGE",
"url": "https://github.com/QuantumNous/new-api"
},
{
"type": "WEB",
"url": "https://github.com/QuantumNous/new-api/releases/tag/v1.0.0-rc.7"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "New API: User List API Leaks Root User Access Token Leading to Privilege Escalation"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.