MEDIUM 6.4

CVE-2026-56306: Capgo API Key Scoping Bypass Vulnerability

Capgo versions before 12.128.2 contain a flaw in how they validate a specific HTTP header used to enforce restricted API key permissions. An authenticated attacker can craft malformed, zero, or duplicate values in the x-limited-key-id header to trick the system into ignoring subkey restrictions. Once the restriction is bypassed, the attacker's request runs with the privileges of the main API key instead of the intended limited subkey, potentially granting broader access than intended.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Weaknesses (CWE)
CWE-20
Affected products
0 configuration(s)
Published / Modified
2026-06-22 / 2026-06-23

NVD description (verbatim)

Capgo before 12.128.2 contains a weak parsing vulnerability in the x-limited-key-id header that allows attackers to bypass subkey enforcement by submitting malformed values, zero, or duplicate headers that result in NaN or falsy values. Remote attackers can manipulate the x-limited-key-id header to disable limited key scoping and execute requests using the main API key context instead of restricted subkey permissions.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-56306 is an improper input validation vulnerability (CWE-20) affecting Capgo's header parsing logic. The x-limited-key-id header, designed to enforce scoped API key permissions, fails to properly sanitize malformed input values. Attackers can submit NaN-inducing strings, zero values, or duplicate headers that the parser treats as falsy, causing the application to skip subkey validation entirely. This results in the request being processed under the full main API key context rather than the restricted subkey permissions model. The vulnerability requires prior authentication (PR:L in CVSS terms) but affects confidentiality and integrity across multiple components (S:C).

Business impact

This vulnerability erodes the security model of API key scoping, which many organizations rely on to limit blast radius when keys are compromised or delegated to third parties. A developer or service account with only a restricted subkey could escalate permissions to match the organization's main API key. Depending on what that main key can do—create users, modify data, access sensitive resources—the impact could range from unauthorized data reads to unintended system modifications. The risk is heightened in multi-tenant or high-delegation environments where subkey restrictions are a primary control.

Affected systems

Capgo versions prior to 12.128.2 are affected. Organizations running Capgo should verify their installed version against the vendor advisory to determine exposure. Patches are available in version 12.128.2 and later.

Exploitability

Exploitation requires valid authentication credentials to submit API requests—an attacker cannot exploit this unauthenticated. However, the attack itself is straightforward: modifying a single header with known malformed patterns. No complex conditions, race conditions, or user interaction are needed. An insider threat or a compromised low-privileged credential poses immediate risk. The CVSS score of 6.4 (MEDIUM) reflects the requirement for authentication but also acknowledges the relative ease and impact once access exists.

Remediation

Upgrade Capgo to version 12.128.2 or later. Verify the upgrade through the vendor's release notes and confirm that header parsing validation is correctly enforced in your deployment. If immediate patching is not feasible, audit API key usage logs for suspicious patterns—particularly requests originating from subkey accounts that access resources outside the intended scope.

Patch guidance

Upgrade to Capgo 12.128.2 or later as soon as practical. Since this is an authentication bypass within the API key model, any instance exposed to untrusted users with API access should be prioritized. Test the patch in a non-production environment first to confirm compatibility with your integration, then roll out to production. Verify that subkey scoping functions correctly post-upgrade by testing restricted keys against resources outside their intended scope—they should be denied.

Detection guidance

Monitor API request logs for authenticated requests (from subkey accounts) that access resources or perform actions inconsistent with that subkey's declared scope. Look for unusual header patterns in the x-limited-key-id field—malformed values, zero or null representations, or duplicate headers—arriving from the same source. Alert on any subkey-origin requests that trigger main-key-level permissions. If available, enable debug logging on header parsing to spot NaN or falsy conversions during key validation.

Why prioritize this

While the CVSS score is MEDIUM (6.4), organizations heavily reliant on API key scoping for least-privilege access control should treat this as higher priority. It directly undermines a foundational security control. It is not on the CISA KEV catalog, so it may not be under active exploitation, but insider threats and compromised accounts make it a practical concern. Prioritize if Capgo is used in environments with delegated API access, multi-tenant deployments, or where subkeys are issued to third parties.

Risk score, explained

The CVSS 3.1 score of 6.4 (MEDIUM) reflects: network-accessible attack surface (AV:N), low attack complexity requiring only header manipulation (AC:L), mandatory prior authentication (PR:L), scope change indicating impact beyond the immediate component (S:C), and low confidentiality and integrity impact (C:L, I:L). The score appropriately excludes availability impact since this is not a denial-of-service issue. The medium rating is justified by the authentication requirement, but organizations using Capgo for fine-grained API delegation should assess local risk as potentially higher.

Frequently asked questions

If I upgrade to 12.128.2, do I need to rotate my existing API keys?

Rotation is not strictly required by the patch itself. However, if you suspect any subkeys were previously used to access resources outside their intended scope, or if your audit logs show suspicious patterns, proactively rotate those subkeys and review what data or actions may have been performed. Rotation is a best practice following any privilege-escalation vulnerability.

Does this vulnerability allow an attacker to create new API keys or access the main key itself?

No. This vulnerability allows an authenticated attacker with a restricted subkey to bypass scoping restrictions and act as if their subkey had main-key-level permissions. It does not expose the main key value itself, nor does it allow key creation. The attacker is still limited to operations available via API; they cannot achieve shell access or read the filesystem, for example.

Our Capgo instance is behind a firewall and only accessible internally. Does this still matter?

Yes. The vulnerability requires authentication, not external network access to exploit. Any internal user or service with a subkey—including contractors, temporary access, or compromised accounts—could exploit it. Internal access does reduce the attack surface, but it does not eliminate the risk from insider threats or account compromise.

Is there a workaround if I cannot patch immediately?

No documented workaround neutralizes the vulnerability. However, as a temporary control, restrict the issuance of new subkeys and conduct a review of existing subkey usage. Disable any subkeys not in active use. Monitor API logs closely for the attack signatures mentioned in the detection guidance. Plan the upgrade as soon as your change window allows.

This analysis is provided for informational purposes to support vulnerability management and security decision-making. It does not constitute legal advice or a guarantee of security. Verify all findings against official vendor advisories and your own testing before making patching decisions. No liability is assumed for actions taken or omitted based on this content. Always consult your organization's security policies and change management procedures. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).