6.5 Ensure The 'test' database is not installed

Information

The default MongoDB installation comes with an unused database called 'test'. It is recommended that the test database be dropped.
Rationale:
The test database can be accessed by all users and can be used to consume system resources. Dropping the test database will reduce the attack surface of the MongoDB server.

Solution

Execute the following command mongoshell to drop the test database:
use test

db.dropDatabase()

See Also

https://workbench.cisecurity.org/files/1705

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-7b., CSCv6|18.9

Plugin: MongoDB

Control ID: de575b73b2839bff8350124e9169803b95a66cd5d12e29b42a509d01d69db1db