/

CVE-2026-64859

Severity:

CRITICAL RISK

(9.1)

Sensitive Data Exposure (CWE-200) in New API User APIs

CVE-2026-64859

Deferred

Vulnerability type

Category:

Sensitive Data Exposure

CWE:

CWE-200

Impact:

Privilege Escalation and Unauthorized System Configuration Access

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

New API exposes user bearer tokens through administrator-facing user listing and lookup APIs because serialized user objects include the access_token field. An authenticated administrator may obtain the root user's token and use it to access root-only system configuration APIs.

Affected context

The issue occurs in New API deployments where administrator user-management endpoints serialize complete User model objects after excluding only password data. It is most relevant when the serialized response includes bearer tokens and the root account has access to privileged system configuration interfaces.

Exploit preconditions

  • Attack surface: Administrator-facing user list and lookup APIs, including GET /api/user/
  • Required access: An authenticated administrator account capable of calling these endpoints
  • Trigger point: User records are returned through API serialization after database queries
  • Why exploitation is possible: Excluding password fields alone does not prevent the access_token field from being exposed, allowing a privileged session to obtain a more powerful root credential

Why this happens

The underlying bug is excessive exposure of sensitive authentication data in API responses. User model objects are serialized after applying an incomplete field exclusion that removes passwords but leaves bearer tokens available to clients.

This maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor. Although the requesting administrator may be authorized to view user-management data, that authorization does not imply permission to retrieve another account's reusable authentication credential.

Potential impact

  • An attacker with administrator access may obtain the root user's bearer token
  • The exposed token could enable unauthorized access to root-only APIs
  • System configuration may be read or modified
  • AI assets, gateway behavior, or connected services could be altered
  • The incident could facilitate data exposure, persistence, or further privilege abuse

General mitigation guidance

Mitigation generally focuses on minimizing response data and separating authentication secrets from user profile models.

Common defensive patterns include:

  • Use explicit response schemas or allowlists rather than serializing complete user objects
  • Never return bearer tokens, refresh tokens, API keys, or equivalent credentials in user-management responses
  • Keep credential material in separate internal representations that cannot be serialized by default
  • Apply field-level authorization so administrative visibility does not imply credential access
  • Require short-lived, scoped tokens and limit the privileges of service and administrative identities
  • Treat token rotation and revocation as standard controls when exposure is suspected

How teams detect issues like this

Organizations can detect this class of issue through:

  • API contract tests that assert sensitive fields are absent from user list and lookup responses
  • Static analysis and code review checks for direct serialization of database or ORM user models
  • Searches for response schemas containing fields such as access_token, refresh_token, secrets, or API keys
  • Authorization tests verifying that administrative roles cannot retrieve reusable credentials
  • API gateway or data-loss-prevention policies that block credential-shaped fields from ordinary JSON responses
  • Audit-log review for unusual root-token use or privileged configuration changes

Sources

SourceLink
github.comgithub.com/QuantumNous/new-api/commit/0936e2504655a5cbf7bc3c388f6d3e2bb24916d3
github.comgithub.com/QuantumNous/new-api/pull/4929
github.comgithub.com/QuantumNous/new-api/releases/tag/v1.0.0-rc.7
github.comgithub.com/QuantumNous/new-api/security/advisories/GHSA-6x2c-phff-wx57

Frequently asked

questions

It can be exploitable through the application's API when the affected user-management endpoints are network-accessible and an attacker has authenticated administrator privileges.

Generally, no. The described exposure requires access to administrator-facing user list or lookup functionality, although the severity of any available administrative role depends on deployment-specific authorization controls.

Return narrowly defined user-management response objects that exclude all authentication credentials by design. Avoid serializing complete User model instances directly into API responses.

Maintain explicit secret-field inventories, test every API response for credential leakage, enforce field-level authorization, and monitor privileged token usage and configuration changes.

Find out what's already
exploitable in your codebase.