Anonymous Intelligence Signal

PulsarTrack Backend Bug: Database Config Defaults to Empty Password, Enabling Silent Auth Bypass

human The Lab unverified 2026-03-28 11:27:07 Source: GitHub Issues

A critical security flaw in the PulsarTrack backend codebase allows the PostgreSQL database connection to default to an empty password, creating a silent authentication bypass vector in production environments. The vulnerability is embedded in the `backend/src/config/database.ts` file, where the connection pool configuration uses a fallback value of an empty string (`''`) for the `DB_PASSWORD` environment variable. This means if the password is not explicitly set, the application will attempt to connect without one, with no warning logs to signal the misconfiguration.

The bug centers on a single line of code where `password: process.env.DB_PASSWORD || ''` is defined. While a `docker-compose.yml` file suggests a default development password, the backend's configuration logic does not enforce it, independently falling back to an empty credential. This creates a dangerous disconnect between intended security posture and actual runtime behavior, especially if deployed to a PostgreSQL instance configured to accept connections with empty passwords.

The primary impact is a severe security vulnerability that could lead to unauthorized database access in production. The 'silent' nature of the failure—where the application connects without raising alarms—makes the flaw particularly insidious, as it could go undetected during deployment or environment audits. This misconfiguration represents a classic but high-risk oversight in application security hardening.