Skip to content

New API: User List API Leaks Root User Access Token Leading to Privilege Escalation

Critical severity GitHub Reviewed Published Jul 3, 2026 in QuantumNous/new-api • Updated Aug 17, 2026

Package

gomod github.com/QuantumNous/new-api (Go)

Affected versions

< 1.0.0-rc.7

Patched versions

1.0.0-rc.7

Description

Vulnerability Information

  • Product: new-api
  • Affected versions: versions before v1.0.0-rc.7 that serialize User.AccessToken as access_token; the issue was confirmed in v0.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.

References

@Calcium-Ion Calcium-Ion published to QuantumNous/new-api Jul 3, 2026
Published to the GitHub Advisory Database Aug 17, 2026
Reviewed Aug 17, 2026
Last updated Aug 17, 2026

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(38th percentile)

Weaknesses

Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. Learn more on MITRE.

CVE ID

CVE-2026-64859

GHSA ID

GHSA-6x2c-phff-wx57

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.