Vulnerabilities in pkg:golang/github.com/cortexproject/cortex

PACKAGE
Advisory Identifier: GHSA-vw7g-3cc7-7rmh
Advisory Summary

CVE-2024-41265 is a HIGH cortex establishes tls connections with vulnerability (CWE-599: Missing Validation of OpenSSL Certificate) affecting Github.com/cortexproject/cortex libraries in the Go ecosystem. The issue involves cortex establishes tls connections with `insecureskipverify` set to `true`. Remediation is available in the latest vendor maintenance releases.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/cortexproject/cortex

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/cortexproject/cortex. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-vw7g-3cc7-7rmh CVE-2024-41265 HIGH cortex establishes TLS connections with `InsecureSkipVerify` set to `true`
GHSA-cq2g-pw6q-hf7j CVE-2022-23536 MODERATE Cortex's Alertmanager can expose local files content via specially crafted config
GHSA-jphm-g89m-v42p CVE-2021-36157 MODERATE Path traversal in Grafana Cortex
GHSA-m45g-f45x-vv22 CVE-2021-31232 MODERATE Improper input validation in CNCF Cortex

CVE-2024-41265 at a Glance

CVE Identifier CVE-2024-41265
GHSA Identifier GHSA-vw7g-3cc7-7rmh
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-599: Missing Validation of OpenSSL Certificate
Affected Product Github.com/cortexproject/cortex
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2024-41265

To remediate this vulnerability, upgrade all affected Github.com/cortexproject/cortex dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/cortexproject/cortex fixed: Latest secure release
Upgrade github.com/cortexproject/cortex to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/cortexproject/cortex

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-41265, inspect your project dependencies for Github.com/cortexproject/cortex:

inspect dependencies for github.com/cortexproject/cortex

Analyze the terminal output to locate any version of Github.com/cortexproject/cortex in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-599: Missing Validation of OpenSSL Certificate, where the product uses openssl and trusts or uses a certificate without using the ssl_get_verify_result() function to ensure that the certificate satisfies all necessary security requirements. In Github.com/cortexproject/cortex, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A TLS certificate verification issue discovered in cortex v0.42.1 allows attackers to obtain sensitive information via the makeOperatorRequest function.

CVE-2024-41265 Affected Github.com/cortexproject/cortex Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cortexproject/cortex
Go
≤ 0.42.1

References

Frequently Asked Questions

What is CVE-2024-41265?
CVE-2024-41265 is a security vulnerability in Github.com/cortexproject/cortex involving cortex establishes TLS connections with `InsecureSkipVerify` set to `true` under CWE-599: Missing Validation of OpenSSL Certificate.
Which Github.com/cortexproject/cortex versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/cortexproject/cortex.
What version fixes CVE-2024-41265?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cortexproject/cortex affected?
Yes, github.com/cortexproject/cortex is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2024-41265?
CVE-2024-41265 is classified under CWE-599: Missing Validation of OpenSSL Certificate (The product uses OpenSSL and trusts or uses a certificate without using the SSL_get_verify_result() function to ensure that the certificate satisfies all necessary security requirements.).
How can I check Go dependencies for CVE-2024-41265?
Run the dependency tree command: 'inspect dependencies for github.com/cortexproject/cortex'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vw7g-3cc7-7rmh",
  "modified" : "2025-12-20T03:08:16Z",
  "published" : "2024-08-01T18:32:50Z",
  "aliases" : [ "CVE-2024-41265" ],
  "summary" : "cortex establishes TLS connections with `InsecureSkipVerify` set to `true`",
  "details" : "A TLS certificate verification issue discovered in cortex v0.42.1 allows attackers to obtain sensitive information via the makeOperatorRequest function.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cortexproject/cortex"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.42.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-41265"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/nyxfqq/1a8237f3f9cf793c6433f08b17d1593c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-vw7g-3cc7-7rmh"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cortexproject/cortex"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3036"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-599" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-02T21:18:36Z",
    "nvd_published_at" : "2024-08-01T16:15:06Z"
  }
}