STIGQter STIGQter: STIG Summary: MongoDB Enterprise Advanced 7.x Security Technical Implementation Guide Version: 1 Release: 2 Benchmark Date: 01 Jul 2026:

MongoDB must separate user functionality (including user interface services) from database management functionality.

DISA Rule

SV-265924r1137655_rule

Vulnerability Number

V-265924

Group Title

SRG-APP-000211-DB-000122

Rule Version

MD7X-00-004600

Severity

CAT II

CCI(s)

Weight

10

Fix Recommendation

Administrators using MongoDB should document the appropriate privileges for various roles appropriate to the application.

For each database, identify the user's roles for the database.

> use <database>
> db.getUser("<username>")

The server will return a document with the user's roles.

To revoke a user's role from a database use the following:

> db.revokeRolesFromUser( "<username>", [ <roles> ], { <writeConcern> } )

To grant a role to a user use the following:

> db.grantRolesToUser( "<username>", [ <roles> ], { <writeConcern> } )

Check Contents

MongoDB grants access to data and commands through role-based authorization and provides built-in roles that provide the different levels of access commonly needed in a database system. Additionally, user-defined roles can be created.

Check a user's role to ensure correct privileges for the function:

Run the following command to get a list of all the databases in the system:

> show dbs

For each database in the system, identify the user's roles for the database:

> use <database>
> db.getUsers()

The server will return a document with the all users in the data and their associated roles.

View a role's privileges:

For each database, identify the privileges granted by a role:

> use <database>
> db.getRole( "<role name>", { showPrivileges: true } )

The server will return a document with the "privileges" and "inheritedPrivileges" arrays.

The "privileges returned document lists the privileges directly specified by the role and excludes those privileges inherited from other roles.

The "inheritedPrivileges" returned document lists all privileges granted by this role, both directly specified and inherited. If the role does not inherit from other roles, the two fields are the same.

If a user has a role with inappropriate privileges, this is a finding.

Vulnerability Number

V-265924

Documentable

False

Rule Version

MD7X-00-004600

Severity Override Guidance

MongoDB grants access to data and commands through role-based authorization and provides built-in roles that provide the different levels of access commonly needed in a database system. Additionally, user-defined roles can be created.

Check a user's role to ensure correct privileges for the function:

Run the following command to get a list of all the databases in the system:

> show dbs

For each database in the system, identify the user's roles for the database:

> use <database>
> db.getUsers()

The server will return a document with the all users in the data and their associated roles.

View a role's privileges:

For each database, identify the privileges granted by a role:

> use <database>
> db.getRole( "<role name>", { showPrivileges: true } )

The server will return a document with the "privileges" and "inheritedPrivileges" arrays.

The "privileges returned document lists the privileges directly specified by the role and excludes those privileges inherited from other roles.

The "inheritedPrivileges" returned document lists all privileges granted by this role, both directly specified and inherited. If the role does not inherit from other roles, the two fields are the same.

If a user has a role with inappropriate privileges, this is a finding.

Check Content Reference

M

Target Key

5637