Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Security Risk Due to Insecure TLS Connections in Cortex Project #2463

Open
nyxfqq opened this issue Jul 10, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@nyxfqq
Copy link

nyxfqq commented Jul 10, 2024

Issue Description

I've identified a recurring pattern within several components of the Cortex project where TLS connections are established with InsecureSkipVerify set to true. This configuration allows the client to bypass TLS certificate verification, which is a fundamental security measure designed to prevent man-in-the-middle (MITM) attacks and ensure data integrity and confidentiality. The specific locations where this insecure practice is observed include:

  • cortexlabs/cortex/cli/cluster/lib_http_client.go in the makeOperatorRequest function
  • cortexlabs/cortex/cli/cluster/logs.go in the streamLogs function
  • cortexlabs/cortex/cli/cmd/lib_cli_config.go in the validateOperatorEndpoint function
  • cortexlabs/cortex/dev/load.go in the makeRequest function
  • cortexlabs/cortex/pkg/lib/requests/requests.go in the MakeRequest function

Impact Analysis

By disabling TLS certificate verification, these functions are vulnerable to MITM attacks, where an attacker could intercept and possibly modify the data exchanged between the client and the server. This poses significant risks to data integrity and confidentiality, potentially leading to data breaches or the execution of unauthorized operations on behalf of the client.

Proposed Solutions

To address this security vulnerability, I propose the following actions:

  1. Enable TLS Certificate Verification: By default, TLS connections should perform strict certificate verification. This ensures that the server's identity is confirmed before any sensitive data is transmitted.

  2. Provide Configuration Options: Introduce configuration settings that allow users to specify their own TLS verification policies, including the ability to import trusted CA certificates or disable verification under controlled conditions.

@nyxfqq nyxfqq added the enhancement New feature or request label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant