Advisories for Golang/Github.com/QuantumNous/New-Api package

2026

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

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 …

New API: Unauthenticated payment webhooks allow memory and disk DoS via unbounded body reads and full-body logging

Unauthenticated payment webhook endpoints could read and log the entire request body before validating the webhook signature. When a payment webhook was enabled, an unauthenticated attacker could send oversized requests to public callback endpoints and force excessive memory use and log growth before the request was rejected. Affected public endpoints included: POST /api/stripe/webhook POST /api/creem/webhook POST /api/waffo/webhook This issue did not allow forging successful payments, because signature validation still guarded …

New API: Redis user quota cache overwrite via PUT /api/user/self allows quota bypass

Authenticated users can repeatedly call PUT /api/user/self with language or sidebar_modules while relay requests are consuming quota. The settings path reads a full User snapshot and writes it back through User.Update(), which refreshes Redis with RedisHSetObj and overwrites the Quota field. This can erase concurrent HINCRBY quota deductions and keep cached balance artificially high, allowing calls far beyond the paid quota.

New API: Integer overflow in quota billing yields negative charges (self-crediting)

Multiple billing paths multiplied user-controlled quantity parameters into the quota calculation without an upper bound or overflow-safe integer conversion. A crafted extreme value (e.g. image n = 18446744073686646784, a wrapped-negative accepted by a *uint field) makes conversions like int(float64(quota) * n) wrap past the int64/int32 range into a large negative quota. The negative quota takes effect at settlement (not at pre-consume), where it is equivalent to crediting the user's balance …

New API: SSRF Protection Bypass via Unresolved Hostname in Notification URLs

The default SSRF protection configuration did not apply IP filtering to hostnames. With ApplyIPFilterForDomain disabled by default, URL validation checked domain allow/block rules but did not resolve a hostname and validate the resolved IP address. Authenticated users could configure notification URLs for Webhook, Bark, or Gotify notifications and point a hostname at an internal or metadata IP address.

New API is vulnerable to CSRF through user email binding

The email and WeChat account binding endpoints used GET requests for state-changing account operations. In deployments where session cookies could be sent on cross-site navigations, an attacker could trigger a logged-in user's browser to bind an attacker-controlled email address or OAuth identity. Affected endpoints included: GET /api/oauth/email/bind GET /api/oauth/wechat/bind

QuantumNous/new-api has an SSRF Filter Bypass via 0.0.0.0

The SSRF protection introduced in v0.9.0.5 (CVE-2025-59146) and hardened in v0.9.6 (CVE-2025-62155) does not block the unspecified address 0.0.0.0. A regular (non-admin) user holding any valid API token can send a multimodal request to /v1/chat/completions, /v1/responses, or /v1/messages with 0.0.0.0 as the image/file URL host, bypassing the private-IP filter and causing the server to issue HTTP requests to localhost. This constitutes at minimum a blind SSRF; when the request is …

New API: Stripe Webhook Signature Bypass via Empty Secret Enables Unlimited Quota Fraud

A critical vulnerability exists in the Stripe webhook handler that allows an unauthenticated attacker to forge webhook events and credit arbitrary quota to their account without making any payment. The vulnerability stems from three compounding flaws: The Stripe webhook endpoint does not reject requests when StripeWebhookSecret is empty (the default). When the HMAC secret is empty, any attacker can compute valid webhook signatures, effectively bypassing signature verification entirely. The Recharge …

2025

new-api is vulnerable to SSRF Bypass

A recently patched SSRF vulnerability contains a bypass method that can bypass the existing security fix and still allow SSRF to occur. Because the existing fix only applies security restrictions to the first URL request, a 302 redirect can bypass existing security measures and successfully access the intranet.