# CVE-2026-142238: OpenCost through 1.121.5 Missing Authentication via /logs/level and /logs/exclude

Source: https://aplosec.si/cve/CVE-2026-142238/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-142238

Medium 6.9 · Reported · No fix listed · CWE-306 · Go

# OpenCost through 1.121.5 Missing Authentication via /logs/level and /logs/exclude

CVE-2026-142238 · published 2026-12-02

In plain words: this type of bug lets someone get past the login or identity check (authentication bypass). No fixed release is listed yet.

## Summary

CVE-2026-142238 affects OpenCost (Go) <= 1.121.5: Missing Authentication via /logs/level and /logs/exclude (CWE-306). No fixed release is listed. CVSS 4.0 base score 6.9 (Medium), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).

OpenCost through 1.121.5 contains a missing authentication vulnerability that allows unauthenticated attackers to change logging configuration through the POST /logs/level and /logs/exclude diagnostic endpoints. Attackers reaching the API port can disable logging, set verbose levels, or install exclusion patterns to suppress the audit trail or flood service logs.

## Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

## Remediation

No fixed release is listed in the advisory. Check the references for upstream status.

## References

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/opencost-through-1.121.5-missing-authentication-via-logs-level-and-logs-exclude](https://www.vulncheck.com/advisories/opencost-through-1.121.5-missing-authentication-via-logs-level-and-logs-exclude)

- [Vulnerable codehttps://github.com/opencost/opencost/blob/v1.121.5/core/pkg/util/apiutil/apiutil.go#L11-L17](https://github.com/opencost/opencost/blob/v1.121.5/core/pkg/util/apiutil/apiutil.go#L11-L17)

- [Vulnerable codehttps://github.com/opencost/opencost/blob/v1.121.5/core/pkg/util/apiutil/loglevel.go#L37-L51](https://github.com/opencost/opencost/blob/v1.121.5/core/pkg/util/apiutil/loglevel.go#L37-L51)

- [Vulnerable codehttps://github.com/opencost/opencost/blob/v1.121.5/pkg/cmd/costmodel/costmodel.go#L114-L120](https://github.com/opencost/opencost/blob/v1.121.5/pkg/cmd/costmodel/costmodel.go#L114-L120)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142238](https://www.cve.org/CVERecord?id=CVE-2026-142238)

**Severity:** Medium 6.9 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-142238)

**Package:** OpenCost

**Ecosystem:** Go

**Affected:** <= 1.121.5

**Fixed:** None

**Weakness:** CWE-306

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder
