Skip to content

Security: Docker MongoDB exposed on 0.0.0.0:27017 allows ransomware attacks #1772

@ebowwa

Description

@ebowwa

Security Issue

MongoDB container is started with port binding to 0.0.0.0:27017 instead of 127.0.0.1:27017, exposing the database to the public internet.

Impact

Automated ransomware scanners found the open MongoDB instance and created a ransom database:

  • Ransom DB name: READ__ME_TO_RECOVER_YOUR_DATA
  • Demanded: 0.0051 BTC
  • Deadline: 48 hours

Root Cause

MentraOS cloud package depends on:

  • mongodb: ^6.13.0
  • mongoose: ^6.5.2

The Docker/run scripts start MongoDB with default port binding to all interfaces.

Recommendation

Bind MongoDB to localhost only:

ports:
  - "127.0.0.1:27017:27017`  # instead of "27017:27017"

Or tailscale recommendation

Evidence

scroll up on this thread

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