CVE-2024-41265: TLS certificate verification issue in cortex v0.42.1

Summary

01/08/2024
No i
High
7.5

CVE-2024-41265: cortex establishes TLS connections with InsecureSkipVerify set to true. Affects github.com/cortexproject/cortex versions < 0.42.1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Cortex is an open-source project written in Go that provides a horizontally scalable, long-term storage for Prometheus metrics. It allows users to store and query large amounts of time-series data efficiently. The vulnerability affects version 0.42.1 of the cortex package.

Vulnerability Detail

The TLS certificate verification issue in cortex v0.42.1 arises from the use of the InsecureSkipVerify option when establishing TLS connections. This allows attackers to obtain sensitive information by bypassing certificate validation. The makeOperatorRequest function is specifically affected by this vulnerability. Exploiting this issue can lead to unauthorized access and potential data leakage.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, developers can modify the code to disable the InsecureSkipVerify option and enforce proper certificate validation. Here is an example of how to modify the makeOperatorRequest function:

// Original code
func makeOperatorRequest() {
    // TLS configuration
    tlsConfig := &tls.Config{
        InsecureSkipVerify: true,
    }
    // Rest of the code
}

// Modified code
func makeOperatorRequest() {
    // TLS configuration
    tlsConfig := &tls.Config{
        InsecureSkipVerify: false,
    }
    // Rest of the code
}

Conclusion

The TLS certificate verification issue in cortex v0.42.1 poses a significant security risk as it allows attackers to bypass certificate validation and obtain sensitive information. It is crucial to update the cortex package to a fixed version and ensure proper certificate validation to mitigate this vulnerability.

See every vulnerability recorded for github.com/cortexproject/cortex →

Share this vulnerability

FAQ

Cortex is an open-source project written in Go that provides a horizontally scalable, long-term storage for Prometheus metrics. It allows users to store and query large amounts of time-series data efficiently.

Version 0.42.1 of the cortex package is affected by this TLS certificate verification issue.

This vulnerability allows attackers to obtain sensitive information by bypassing certificate validation. It can lead to unauthorized access and potential data leakage.

To fix this vulnerability, update the cortex package to a version that addresses the TLS certificate verification issue. Ensure that TLS connections are established with proper certificate validation.

Yes, as a temporary workaround, you can modify the code to disable the InsecureSkipVerify option and enforce proper certificate validation. Refer to the 'workaround' section for more details.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/cortexproject/cortex.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback