{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "last_affected": "1.121.5"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "32dbf049c84c66db1efeb9fc9a98e5042f076cf1"
            }
          ],
          "repo": "https://github.com/opencost/opencost",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-306"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142238.json"
  },
  "details": "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.",
  "id": "CVE-2026-142238",
  "modified": "2026-12-02T23:45:26.548043474Z",
  "published": "2026-12-02T16:50:05.078Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142238.json"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/opencost/opencost"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/opencost/opencost/blob/v1.121.5/core/pkg/util/apiutil/apiutil.go#L11-L17"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/opencost/opencost/blob/v1.121.5/core/pkg/util/apiutil/loglevel.go#L37-L51"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/opencost/opencost/blob/v1.121.5/pkg/cmd/costmodel/costmodel.go#L114-L120"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-142238"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/opencost-through-1.121.5-missing-authentication-via-logs-level-and-logs-exclude"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "OpenCost through 1.121.5 Missing Authentication via /logs/level and /logs/exclude"
}