Skip to content

External authorization bypass when virtualhost authPolicy is disabled

Moderate
tsaarni published GHSA-cf57-xf33-fg5h Aug 12, 2026

Package

No package listed

Affected versions

>= v1.25.0

Patched versions

v1.33.6

Description

Impact

Routes expected to be protected by external authorization are served without enforcement. This occurs when the virtualhost defines its own authorization server with authPolicy.disabled: true and individual routes attempt to opt back in with authPolicy.disabled: false.

Details

Contour supports defining external authorization globally (via globalExtAuth in the Contour config file), allowing individual virtualhosts to opt out by setting .spec.virtualhost.authorization.authPolicy.disabled: true. Individual routes can then opt back in by setting .spec.routes[].authPolicy.disabled: false. This works correctly with global authorization.

However, if instead of using global authorization, a user defines the authorization server directly on the virtualhost using .spec.virtualhost.authorization.extensionRef and simultaneously disables it .spec.virtualhost.authorization.authPolicy.disabled: true, the route-level opt-in silently fails, and routes with authPolicy.disabled: false are served without authorization enforcement.

The following example shows an affected HTTPProxy:

kind: HTTPProxy
metadata:
  name: example
spec:
  virtualhost:
    fqdn: example.projectcontour.io
    tls:
      secretName: example-tls
    authorization:      # Define authorization server, but disable it.
      extensionRef:
        name: extension
        namespace: auth
      authPolicy:
        disabled: true
  routes:
    - conditions:
      - prefix: /protected
      services:
      - name: app-server
        port: 80
      authPolicy:
        disabled: false  # Opt-in silently fails and /protected is served without authorization
    - conditions:
      - prefix: /public
      services:
      - name: app-server
        port: 80

To list if you have HTTPProxies with this configuration run

kubectl get httpproxy -A -o json | jq -r '
  .items[]
  | select(.spec.virtualhost.authorization.extensionRef)
  | select(.spec.virtualhost.authorization.authPolicy.disabled)
  | select(.spec.routes[]?.authPolicy.disabled == false)
  | "\(.metadata.namespace)/\(.metadata.name)"
'

Note: If you also have globalExtAuth configured, the HTTPProxies are still protected, but by the global authz server, not the one defined as disabled in the virtualhost's extensionRef.

Patches

Users should upgrade to v1.33.6.

Workarounds

Set .spec.virtualhost.authorization.authPolicy.disabled: false (which is the default if omitted) so that authorization is active by default. Then explicitly disable it only on public routes by setting .spec.routes[].authPolicy.disabled: true.

References

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

CVE ID

No known CVE

Weaknesses

No CWEs