{"id":"CVE-2026-44300","published":"2026-09-15T17:08:15Z","modified":"2026-09-15T19:45:01Z","title":"OpenCost ServiceKey Endpoint Unauthorized Credential Overwrite/Injection","vendor":"opencost","product":"opencost","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00753,"percentile":0.51235,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"},{"id":"CWE-309","name":"Use of Password System for Primary Authentication"}],"references":[{"url":"https://github.com/opencost/opencost/security/advisories/GHSA-wmj8-9953-vff5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/opencost/opencost/pull/3651","tags":["x_refsource_MISC"]},{"url":"https://github.com/opencost/opencost/pull/3910","tags":["x_refsource_MISC"]},{"url":"https://github.com/opencost/opencost/commit/69430e7f627b3e62c8999312c06949267fab813a","tags":["x_refsource_MISC"]},{"url":"https://github.com/opencost/opencost/commit/a49a25bc2e0d6e220a131a4dc58f38ebe6ae851b","tags":["x_refsource_MISC"]},{"url":"https://github.com/opencost/opencost/releases/tag/v1.120.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/opencost/opencost/releases/tag/v1.121.0","tags":["x_refsource_MISC"]}],"priority":{"score":16.4,"factors":[{"name":"EPSS percentile","points":10.25},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"opencost","affectedVersions":[{"vendor":"opencost","product":"opencost","versions":["< 1.121.0"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-09-15T19:16:35.644735Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/opencost/opencost","vulnerableRanges":["<1.119.1"],"patched":["1.119.1"],"from":["GHSA-wmj8-9953-vff5","GO-2026-5974"],"provenance":"source"}],"summary":{"text":"OpenCost, a Kubernetes and cloud cost monitoring tool, contains a flaw in its POST /serviceKey endpoint (pkg/costmodel/router.go), which accepts a key value and writes it into the GCP service-account key.json file that OpenCost uses for credentials. An unauthenticated network client can overwrite that credential file's contents, which can disrupt GCP cost collection or cause OpenCost to run with attacker-selected credentials, and the wildcard CORS header allows this to be triggered from a browser when the service is reachable from one.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:36:51Z"},"euvd":{"id":"EUVD-2026-78874","exploited":false,"provenance":"source"}}