---
id: CVE-2026-56239
title: Capgo - Privilege Escalation via SECURITY DEFINER Function apply_usage_overage
summary: >-
  Capgo before 12.128.2 contains a potential privilege escalation vulnerability
  in the public.apply_usage_overage SECURITY DEFINER function, which performs
  sensitive billing operations without enforcing internal authorization checks
  (no va…
severity: high
cvss: 7.6
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L'
cvssSource: cna
cwe:
  - CWE-269
vendor: Capgo
product: Capgo
affected:
  - Capgo < 12.128.2
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-06-24T15:37:59.240720Z'
exploitAvailable: true
published: '2026-06-21'
updated: '2026-11-08'
sourceUpdated: '2026-11-08T14:05:42.237Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-56239'
references:
  - url: 'https://github.com/Cap-go/capgo/security/advisories/GHSA-qq85-vjrq-m75g'
    label: GitHub Security Advisory (GHSA-qq85-vjrq-m75g)
  - url: >-
      https://www.vulncheck.com/advisories/capgo-privilege-escalation-via-security-definer-function-apply-usage-overage
    label: >-
      VulnCheck Advisory: Capgo - Privilege Escalation via SECURITY DEFINER
      Function apply_usage_overage
tags:
  - cve.org
  - exploit-available
epss: 0.00346
epssPercentile: 0.28378
ingestedAt: '2026-11-08T14:51:22.364Z'
---

## Overview

Capgo before 12.128.2 contains a potential privilege escalation vulnerability in the public.apply_usage_overage SECURITY DEFINER function, which performs sensitive billing operations without enforcing internal authorization checks (no validation of auth.uid(), org membership, or check_min_rights). Because the function runs with the owner's privileges, it bypasses Row Level Security. If EXECUTE permission is available to the authenticated or anon roles (explicitly or via default privileges), an authenticated user could invoke it via Supabase RPC to manipulate billing data for arbitrary organizations, including unauthorized credit depletion and fraudulent overage event insertion.

## Affected

- `Capgo < 12.128.2`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
