CVE-2026-71479: New API: Integer overflow in quota billing yields negative charges (self-crediting)
Summary
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 — turning a small positive balance into an enormous one.
Timeline(UTC+8)
This vulnerability was confirmed exploited in the wild. Response timeline (UTC+8):
- 2026-07-06 23:00 — Community user @lihui12388 reported that their deployment had been exploited via this vulnerability (large negative consumption entries in logs and abnormally inflated balances). We confirmed in-the-wild exploitation and started an emergency response immediately. - 2026-07-07 01:17 — Emergency fix released as v1.0.0-rc.18, roughly 2 hours after the report. - 2026-07-07 (next day) — Given the confirmed active exploitation, we publicly disclosed the vulnerability and the fixed version to the community the following day so that all operators could upgrade and audit promptly. - 2026-07-07 13:19 — v1.0.0-rc.19 released with additional observability (quota-saturation warning logs) to help operators audit and monitor abuse.
Preconditions
This is not a zero-balance freebie. The attacker must hold an account whose wallet balance is > 0 and at least covers the request's normal (un-inflated) pre-consume amount — the pre-consume gate rejects userQuota <= 0 and insufficient balance with HTTP 403. Quantity multipliers (n, duration, ...) are not applied at pre-consume; the overflow only manifests at settlement, flipping the charge negative and crediting the balance.
Severity escalates when the deployment enables any feature that grants free starting balance, because the required positive balance is then obtained at zero cost and at scale: check-in rewards (CheckinSetting.Enabled), invite rebates (QuotaForInviter / QuotaForInvitee), or new-user quota gifts (QuotaForNewUser). With self-registration on by default and any of these enabled, an attacker can register (or mass-register) to obtain seed balance for free, then inflate it via a single crafted request — effectively unauthenticated exploitation.
Impact
A low-privilege user with a positive balance can massively inflate their own balance with a single crafted request (negative settlement = credit), violating billing integrity. Sustained abuse can drain the operator's prepaid upstream funds and render billing/service unavailable. Exploitation in the wild has been confirmed (see Timeline above).
Root cause
Single root cause: user-controlled multipliers lacked upper-bound validation before entering quota math, and the float/decimal-to-int conversions lacked saturation. Because uint accepts huge positive values (a wrapped negative), a >= 0 check is insufficient — an explicit upper bound is required.
Fix
Fixed via defense-in-depth: (1) upper-bound validation at request ingress (400 on violation), (2) local clamping of the same quantities on validation-bypass paths (passthrough/metadata/multipart), and (3) centralized saturating conversions in common/quotamath.go that clamp to int32 and never wrap. Saturation events are additionally audited on the related consume/task log under admininfo.quotasaturation (admin-only) and via request-correlated backend warnings.
Other sources
New API is a large language mode (LLM) gateway and artificial intelligence (AI) asset management system. Prior to 1.0.0-rc.18, user-controlled image n, video seconds and duration, maxtokens, maxcompletiontokens, maxOutputTokens, audio duration, and billing-expression quantities can overflow conversions in common/quotamath.go and related settlement paths, allowing a low-privileged account with positive balance or an active subscription to turn a negative charge into account credit and potentially drain upstream funds. This issue is fixed in version 1.0.0-rc.18.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/QuantumNous/new-apito a version that resolves this vulnerability.Fixed in 1.0.0-rc.18 - Upgrade
Upgrade
QuantumNous/new-apito a version that resolves this vulnerability.Fixed in 1.0.0-rc.18 - Upgrade
Upgrade
QuantumNous/new-apito a version that resolves this vulnerability.Fixed in v1.0.0-rc.19Patch v1.0.0-rc.19 - Configuration
Implement request-ingress upper-bound validation for user-controlled quantity multipliers/quantities; return HTTP 400 when values violate the upper bound.
New API ingress quota billing validation upper-bound validation for user-controlled quantity multipliers (e.g., n, image count, video seconds/duration, max_tokens, max_completion_tokens, maxOutputTokens, audio duration, billing-expression quantities) = 400 on violation - Configuration
In common/quota_math.go and related settlement-path conversions, use centralized saturating conversions that clamp to int32 and never wrap (prevent negative charges from overflow).
New API quota billing conversions (common/quota_math.go) saturating conversions and int clamping (int32) = Clamp to int32 and never wrap - Configuration
On validation-bypass paths (passthrough/metadata/multipart), apply local clamping of the same quantities to prevent overflow when ingress validation is bypassed.
New API validation-bypass paths local clamping of quantities on validation-bypass paths (passthrough/metadata/multipart) = Apply same upper-bound clamping locally - Compensating control
If any free-balance/grant features are enabled, disable them to reduce attacker ability to obtain seed balance for free and scale inflation: check-in rewards (CheckinSetting.Enabled), invite rebates (QuotaForInviter / QuotaForInvitee), or new-user quota gifts (QuotaForNewUser).
- Operational
Audit for abuse by checking the consume/task logs for quota saturation events under admin_info.quota_saturation (admin-only) and related request-correlated backend warning logs (added in v1.0.0-rc.19).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-71479?
The severity of CVE-2026-71479 is critical, rated at 9.1.
How do I fix CVE-2026-71479?
To fix CVE-2026-71479, update to version 1.0.0-rc.18 or later of the New API.
What type of vulnerability is CVE-2026-71479?
CVE-2026-71479 is an integer overflow vulnerability.
What systems are affected by CVE-2026-71479?
CVE-2026-71479 affects versions of the New API prior to 1.0.0-rc.18.
What could an attacker achieve with CVE-2026-71479?
An attacker could exploit CVE-2026-71479 to create negative charges during quota billing, enabling self-crediting.