Skip to content

Do not publish PostgreSQL with default credentials #109

Description

@tnull

Summary

The shipped docker-compose.yml configures PostgreSQL with
POSTGRES_USER=postgres and POSTGRES_PASSWORD=postgres, then publishes the
database as 5432:5432 on all host interfaces.

Observed on 88a5703496386465556d920dccf49512296c53d0 (current main). This is
a deployment-sample issue rather than a Rust server logic bug.

Impact

If the Compose setup is run on a reachable host without an external firewall,
anyone who can reach port 5432 can attempt database access with the published
default credentials. Successful access exposes all tenants' VSS data and
allows modification or deletion.

Proof of concept

Against a disposable Compose deployment:

PGPASSWORD=postgres psql -h SERVER -U postgres -d postgres

The connection succeeds when SERVER:5432 is network-reachable.

Suggested remediation

  • Remove the host 5432:5432 mapping; the application can reach PostgreSQL on
    the internal Compose network.
  • Require a generated/operator-provided secret rather than a checked-in
    password.
  • Clearly mark the Compose file as development-only if that is its scope.

Reported by Bitcoin Red Team.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions