GHSA-8r8v-xf7q-rcpr: Integer Overflow

Published Aug 17, 2026
·
Updated

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.

Affected Software

1 affected componentFixes available
go/github.com/QuantumNous/new-api<=1.0.0-rc.17
1.0.0-rc.18

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/QuantumNous/new-api to a version that resolves this vulnerability.

    Fixed in 1.0.0-rc.18
  2. Upgrade

    Upgrade QuantumNous/new-api to a version that resolves this vulnerability.

    Fixed in v1.0.0-rc.18
  3. Upgrade

    Upgrade QuantumNous/new-api to a version that resolves this vulnerability.

    Fixed in v1.0.0-rc.19
  4. Configuration

    Because severity escalates when the deployment enables any feature that grants free starting balance, disable these features (Check-in rewards via CheckinSetting.Enabled, invite rebates via QuotaForInviter/QuotaForInvitee, and new-user quota gifts via QuotaForNewUser) until upgraded and audited.

    new-api CheckinSetting.Enabled / QuotaForInviter / QuotaForInvitee / QuotaForNewUser = disable (set to disabled/zero per the deployment's configuration)
  5. Compensating control

    Apply defense-in-depth at request ingress by enforcing upper-bound validation on user-controlled quantity multipliers/durations so that violations are rejected with HTTP 400, and ensure the same quantities are clamped on validation-bypass paths (passthrough/metadata/multipart).

  6. Compensating control

    Use centralized saturating conversions in common/quota_math.go so quantity calculations clamp to int32 and never wrap (avoid wrapped negatives from *uint accepting huge positive values).

  7. Operational

    Audit for abuse using quota-saturation events under admin_info.quota_saturation (admin-only) and request-correlated backend warnings, especially after upgrading to confirm/quantify any in-the-wild exploitation.

Event History

Aug 17, 2026
Advisory Published
via GitHub·04:36 PM
Data Sourced
via GitHub·04:36 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-8r8v-xf7q-rcpr?

The severity of GHSA-8r8v-xf7q-rcpr is rated as critical with a score of 9.1.

2

What type of vulnerability is GHSA-8r8v-xf7q-rcpr?

GHSA-8r8v-xf7q-rcpr is classified as an Integer Overflow vulnerability.

3

How do I fix GHSA-8r8v-xf7q-rcpr?

To fix GHSA-8r8v-xf7q-rcpr, ensure that user-controlled quantity parameters are validated and converted using safe integer methods to prevent overflow.

4

Which software is affected by GHSA-8r8v-xf7q-rcpr?

The software affected by GHSA-8r8v-xf7q-rcpr is the go/github.com/QuantumNous/new-api.

5

What risk does GHSA-8r8v-xf7q-rcpr pose?

GHSA-8r8v-xf7q-rcpr poses a high risk by allowing user-controlled inputs to exceed quota limits leading to potential denial of service or data manipulation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203