CVE-2026-44300
Received Received - Intake

GCP Service Key Injection in OpenCost

Vulnerability report for CVE-2026-44300, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-15

Last updated on: 2026-09-15

Assigner: GitHub, Inc.

Description

OpenCost provides cost monitoring for Kubernetes workloads and cloud costs. Prior to 1.121.0, the POST /serviceKey endpoint in pkg/costmodel/router.go allows a network client to invoke AddServiceKey without mandatory authentication and submit an arbitrary key form value that is written to the GCP service-account key.json file returned by GetGCPAuthSecretFilePath in core/pkg/env/core.go. The attacker controls the file contents but not the CONFIG_PATH-derived directory, the key.json filename, or the file mode. Replacing the credential contents can disrupt GCP cost collection or cause OpenCost to use attacker-selected credentials, and the wildcard Access-Control-Allow-Origin response permits browser-assisted requests when the service is reachable from a browser. This issue is fixed in version 1.121.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-15
Last Modified
2026-09-15
Generated
2026-09-15
AI Q&A
2026-09-15
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
opencost opencost to 1.121.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-20 The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
CWE-309 The use of password systems as the primary means of authentication may be subject to several flaws or shortcomings, each reducing the effectiveness of the mechanism.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

OpenCost before version 1.121.0 has an issue in the POST /serviceKey endpoint where an unauthenticated network client can call AddServiceKey and provide an arbitrary key value. This value is then written to a GCP service-account key.json file. The attacker controls the file contents but not the directory, filename, or file permissions. This allows replacing credentials which could disrupt GCP cost collection or force OpenCost to use attacker-selected credentials. The service also allows browser-assisted requests due to a wildcard Access-Control-Allow-Origin header.

Detection Guidance

Check OpenCost version with 'kubectl get deployment opencost -n <namespace> -o jsonpath='{.spec.template.spec.containers[0].image}'' to see if it is below 1.121.0. Inspect network traffic for POST requests to /serviceKey endpoints. Review GCP service-account key.json files for unexpected modifications.

Impact Analysis

If you use OpenCost before version 1.121.0, an attacker could replace your GCP service-account credentials. This might disrupt your Kubernetes workload cost monitoring or cause OpenCost to use malicious credentials, potentially leading to incorrect billing data or unauthorized access to your cloud resources.

Mitigation Strategies

Upgrade OpenCost to version 1.121.0 or later immediately. Restrict network access to the /serviceKey endpoint if possible. Rotate any exposed GCP service-account credentials and audit their usage.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-44300. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart