Skip to content

Hard-coded SSL Configuration Insecurity #55

Description

@Aayuiiitmg

Description
Database connection in backend/config/db.js uses ssl: { rejectUnauthorized: false } by default, which disables SSL certificate verification and exposes the application to
MITM attacks.

Current Issue
The SSL verification is globally disabled without any consideration for the environment. This is acceptable only for trusted development databases, but not for production or
cloud services.

Proposed Improvement
Make SSL verification configurable via process.env.DB_SSL_VERIFY (default: true). Only disable verification for specific whitelisted environments like local development.

Expected Outcomes

  • Enables secure connections by default
  • Prevents man-in-the-middle attacks
  • Maintains flexibility for different environments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions