MD7X-00-002900 Database objects (including but not limited to tables, indexes, storage, stored procedures, functions, triggers, links to software external to MongoDB, etc.) must be owned by database/DBMS principals authorized for ownership.

Information

Within the database, object ownership implies full privileges to the owned object, including the privilege to assign access to the owned objects to other subjects. Database functions and procedures can be coded using definer's rights. This allows anyone who uses the object to perform the actions if they were the owner. If not properly managed, this can lead to privileged actions being taken by unauthorized individuals.

Conversely, if critical tables or other objects rely on unauthorized owner accounts, these objects may be lost when an account is removed.

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

For each user identified as having a "dbOwner" role on a database they are not authorized for, revoke the "dbOwner" role from that user on that database by running the following commands:

use <database>
db.revokeRolesFromUser() command

https://www.mongodb.com/docs/v7.0/reference/command/revokeRolesFromUser/

Example to revoke "dbOwner" role from "user1" on the "anotherDatabase" in the "admin" database:

use admin
db.revokeRolesFromUser(
"user1",
[
{ role: "dbOwner", db: "anotherDatabase" }
]
)

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_MongoDB_Enterprise_Advanced_7-x_V1R1_STIG.zip

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-5(6), CAT|II, CCI|CCI-001499, Rule-ID|SV-265913r1028525_rule, STIG-ID|MD7X-00-002900, Vuln-ID|V-265913

Plugin: MongoDB

Control ID: 39ba237626ab82b8c38565b4d16a5706a763a1f5f19c5ed861538294ec440e37