/

CVE-2026-61672

Severity:

HIGH RISK

(7.1)

Case-Sensitive Filter Bypass (CWE-697) in Capsule K8s

CVE-2026-61672

Deferred

Vulnerability type

Category:

Incorrect Comparison

CWE:

CWE-697, CWE-863

Impact:

Authorization and Policy Restriction Bypass

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Capsule contains a comparison-ordering flaw in its forbidden metadata key validation. An authenticated tenant owner may bypass a configured namespace, Service, or delegated node metadata restriction when forbidden keys use capitalization patterns that are sorted differently by the validator and its binary search.

Affected context

The issue occurs in Capsule deployments that use ForbiddenListSpec.ExactMatch to restrict metadata keys. It becomes relevant when an administrator-configured forbidden list contains mixed-case keys, or other entries whose case-insensitive ordering differs from their byte-order ordering. Uniformly lowercase lists whose orderings coincide are not affected.

Exploit preconditions

  • Attack surface: Capsule tenant metadata validation through Kubernetes-facing APIs
  • Required access: Authenticated access as a tenant owner with permission to submit or modify relevant tenant-scoped resources
  • Trigger point: Validation of metadata keys against ForbiddenListSpec.ExactMatch
  • Why exploitation is possible: The forbidden list is prepared using case-insensitive ordering, while sort.SearchStrings expects byte-order sorting, allowing a present key to be missed by the binary search

Why this happens

The underlying bug is an inconsistent ordering assumption between list preparation and lookup. Forbidden keys are sorted case-insensitively, but the binary-search routine expects the collection to be sorted according to byte-order comparisons. When those orderings differ, the search can incorrectly report that a denied key is absent. This maps primarily to CWE-697: Incorrect Comparison, with an authorization impact related to CWE-863: Incorrect Authorization.

Potential impact

  • A tenant owner may bypass selected metadata restrictions
  • Namespace or Service policy boundaries could be weakened
  • Delegated node metadata restrictions could be bypassed
  • Network exposure could increase through improperly permitted metadata
  • Workload scheduling could be influenced outside intended tenant constraints
  • Cluster governance or multi-tenancy guarantees could be weakened

General mitigation guidance

Mitigation generally focuses on making collection ordering and lookup semantics consistent, or avoiding order-dependent searches for policy enforcement.

Common defensive patterns include:

  • Using the same comparison function for sorting and searching
  • Preferring exact-match sets or normalized-key maps for membership checks
  • Normalizing metadata keys consistently before validation where Kubernetes semantics permit
  • Treating policy validation as deny-by-default when lookup behavior is uncertain
  • Limiting tenant permissions according to least privilege
  • Reviewing existing forbidden lists for mixed-case entries and enforcing a documented normalization policy
  • Applying independent admission and authorization controls for sensitive metadata

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that compare sorting comparators with binary-search comparators
  • Code review checks for case normalization, locale-sensitive comparisons, and membership tests
  • Unit tests covering mixed-case, duplicate, empty, and boundary-position keys
  • Property-based tests verifying that every listed forbidden key is rejected
  • Policy tests that submit restricted metadata through each supported resource path
  • Admission or authorization monitoring for tenant resources containing keys expected to be denied
  • Automated review tools that flag inconsistent comparator usage and authorization checks

Sources

SourceLink
github.comgithub.com/projectcapsule/capsule/commit/755cef54bf4a1bc56d6692130132bc70755bef46
github.comgithub.com/projectcapsule/capsule/pull/1982
github.comgithub.com/projectcapsule/capsule/releases/tag/v0.13.7
github.comgithub.com/projectcapsule/capsule/security/advisories/GHSA-gjw4-3v3v-rqxg

Frequently asked

questions

It may be exploitable through Kubernetes API interactions when a tenant owner can submit metadata that is checked by Capsule's forbidden-list validation. It is not an unauthenticated issue based on the described conditions.

The attacker generally needs authenticated tenant-owner privileges and the ability to create or modify tenant-scoped resources whose metadata is subject to the affected restrictions.

Make sorting and searching use identical comparison semantics, or replace the binary search with a normalized exact-membership structure that cannot produce inconsistent results.

Test authorization policies with mixed-case and boundary-value inputs, define a single normalization policy, and add regression tests proving that every configured denied key is consistently rejected.

Find out what's already
exploitable in your codebase.