Skip to main content
Menu
Advisories

Missing Authorization Vulnerability in Resource Refresh API Endpoints

GHSA-GP97-G7W8-W8C7Published Updated GitHub

Description

Kargo's API exposes endpoints that "refresh" a resource, i.e. annotate it so that its controller reconciles it immediately rather than on its normal schedule. Refreshing a Warehouse triggers immediate artifact discovery; refreshing a Stage triggers immediate health checks and verification (and refreshes its current Promotion, if any); refreshing a ProjectConfig or the cluster-scoped ClusterConfig triggers reconciliation of those resources.

Because refreshing works by writing an annotation, it originally required patch permission on the target resource. In v1.5.0 this was intentionally relaxed so that users could be permitted to refresh a resource without being permitted to edit it. The intended replacement check -- that the caller could at least get the resource -- was never implemented. Since then, the refresh endpoints have performed no authorization check at all beyond confirming that the caller is authenticated and, for Project-scoped resources, that the named Project exists.

The affected endpoints are:

  1. POST /v1beta1/projects/{project}/warehouses/{warehouse}/refresh
  2. POST /v1beta1/projects/{project}/stages/{stage}/refresh
  3. POST /v1beta1/projects/{project}/promotions/{promotion}/refresh
  4. POST /v1beta1/projects/{project}/config/refresh
  5. POST /v1beta1/system/cluster-config/refresh

The legacy gRPC RefreshResource endpoint, in versions where it exists, has the same behavior.

Any principal that can authenticate to the Kargo API server -- including one holding no Kargo permissions whatsoever -- can therefore force reconciliation of any Warehouse, Stage, Promotion, or ProjectConfig in any Project, and of the ClusterConfig. Because the endpoints return different status codes for resources that exist and resources that do not, they also allow such a principal to confirm the names of resources in Projects they cannot otherwise see.

Base Metrics

The following sections provide the rationale for the values selected for each of CVSS v4's base metrics.

Attack Vector (AV): Network

The affected endpoints are served by the Kargo API server over HTTP/HTTPS. No local or physical access is required.

Attack Complexity (AC): Low

The attack requires only well-formed API requests to the affected endpoints.

Attack Requirements (AT): None

No specific environmental conditions are required beyond those that are typical for any Kargo instance.

Privileges Required (PR): Low

The attacker must be able to authenticate to the Kargo API server. No Kargo permissions of any kind are required beyond that.

User Interaction (UI): None

The attack is fully automated via API calls. No other user needs to take any action.

Confidentiality Impact to Vulnerable System (VC): Low

The endpoints' responses reveal whether a resource with a given name exists in a given Project. This permits an attacker to confirm the names of Warehouses, Stages, and Promotions in Projects they have no access to. No resource content is exposed.

Integrity Impact to Vulnerable System (VI): Low

The attacker can write a refresh annotation onto resources in any Project, and onto the ClusterConfig. This is an unauthorized modification of another tenant's resources, but the modification is confined to a single annotation whose only effect is to trigger reconciliation. The attacker cannot alter any resource's spec, cannot cause Freight to be created for artifacts that do not exist, and cannot alter the outcome of any reconciliation -- only its timing.

Availability Impact to Vulnerable System (VA): Low

Refresh requests are not rate-limited, and each one causes the corresponding controller to perform work it would otherwise perform far less frequently. Warehouse artifact discovery in particular is comparatively expensive. Repeated refreshes across many resources can degrade the controller's ability to reconcile other resources in a timely manner. Kargo does not become unavailable, and the load is bounded by the controller's own concurrency limits.

Confidentiality Impact to Subsequent Systems (SC): None

The vulnerability does not provide any mechanism for the attacker to read data from external systems.

Integrity Impact to Subsequent Systems (SI): None

Where a Stage is configured for automatic promotion, forcing artifact discovery on its Warehouse lets the attacker influence when newly discovered artifacts are promoted, but not what is promoted. Anything promoted as a result would have been promoted shortly thereafter regardless. The attacker cannot cause downstream systems to receive content that Kargo's configuration would not otherwise have delivered.

Availability Impact to Subsequent Systems (SA): Low

Forced Warehouse discovery causes the controller to query the affected Project's Git repositories, container registries, and Helm repositories using that Project's own credentials. Repeated refreshes can therefore consume a victim Project's rate-limit budget with those providers, causing legitimate discovery to fail or be delayed. This is a degradation, not an outage, and affects only the victim's use of those services.

Mitigating Factors

  • Exploitation requires authentication to the Kargo API server. Anonymous access is not sufficient.
  • The attacker cannot read, create, modify, or delete any resource content, cannot alter any Stage's promotion pipeline, and cannot cause any artifact to be promoted that would not otherwise have been. The direct effect of exploitation is limited to forcing controllers to do, immediately, work they would otherwise do on a schedule.
  • The refresh annotation records a timestamp, and controller logs record each reconciliation, so unexpected refresh activity is observable.
  • There is no evidence of exploitation in the wild.

Affected versions

References

GitHub · akuity/kargo