CVE-2026-44300
moderateUnauthenticated credential overwrite in OpenCost /serviceKey endpoint (pre-1.121.0)
OpenCost prior to 1.121.0 exposes a POST /serviceKey endpoint (pkg/costmodel/router.go) that calls AddServiceKey without mandatory authentication, letting any network client who can reach the service write an attacker-controlled key form value into the GCP service-account key. file at the location derived from GetGCPAuthSecretFilePath. The attacker controls the file contents but not the CONFIG_PATH-derived directory, the key. filename, or the file mode, so this is a credential-replacement flaw rather than arbitrary file write. Successful exploitation lets an attacker disrupt GCP cost collection (availability impact) or cause OpenCost to authenticate to GCP with attacker-selected credentials (integrity impact), reflected in the CVSS 4.0 score of 8.8 with high integrity and availability impact and no direct confidentiality impact. A wildcard Access-Control-Allow-Origin on responses also permits browser-assisted requests when the service is reachable from a victim's browser. The issue is fixed in OpenCost 1.121.0; there is no known public PoC, no confirmed exploitation in the wild, and it is not listed in CISA's KEV.
What to do: Upgrade OpenCost to version 1.121.0 or later as soon as possible. If immediate upgrade is not feasible, restrict network access to the OpenCost UI/API port so only trusted cluster-internal or VPN clients can reach it, and verify the contents of the GCP service-account key. file at the CONFIG_PATH location for signs of unauthorized replacement. Also rotate the GCP service-account credentials if tampering is suspected and review GCP audit logs for unexpected API activity under that identity.
| OpenCost (CNCF project) OpenCost | all versions prior to 1.121.0 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Weakness
- CWE-20, CWE-309
- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.