MongoDB Enterprise Advanced 4.x Security Technical Implementation Guide
Pick two releases to diff their requirements.
Open a previous version of this STIG.
Digest of Updates ⚠ 11 ✎ 1
Comparison against the immediately-prior release (V1R1). Rule matching uses the Group Vuln ID. Content-change detection compares the rule’s description, check, and fix text after stripping inline markup — cosmetic-only edits aren’t flagged.
Severity changes 11
- V-252139 Medium High If passwords are used for authentication, MongoDB must transmit only encrypted representations of passwords.
- V-252146 Medium High MongoDB must use NIST FIPS 140-2 or 140-3 validated cryptographic modules for cryptographic operations.
- V-252149 Medium High MongoDB must integrate with an organization-level authentication/access mechanism providing account management and automation for all users, groups, roles, and any other principals.
- V-252150 Medium High MongoDB must enforce approved authorizations for logical access to information and system resources in accordance with applicable access control policies.
- V-252152 Medium High MongoDB software installation account must be restricted to authorized users.
- V-252158 Medium High If passwords are used for authentication, MongoDB must implement LDAP or Kerberos for authentication to enforce the DoD standards for password complexity and lifetime.
- V-252159 Medium High If passwords are used for authentication, MongoDB must store only hashed, salted representations of passwords.
- V-252160 Medium High MongoDB must enforce authorized access to all PKI private keys stored/utilized by MongoDB.
- V-252162 Medium High MongoDB must obscure feedback of authentication information during the authentication process to protect the information from possible exploitation/use by unauthorized individuals.
- V-252165 Medium High MongoDB must protect the confidentiality and integrity of all information at rest.
- V-252184 Medium High MongoDB products must be a version supported by the vendor.
Content changes 1
- V-252164 Medium description MongoDB must maintain the authenticity of communications sessions by guarding against man-in-the-middle attacks that guess at Session ID values.
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000130
- Version
- MD4X-00-000100
- Vuln IDs
-
- V-252134
- Rule IDs
-
- SV-252134r855500_rule
Checks: C-55590r855499_chk
Check the MongoDB configuration file (default location: /etc/mongod.conf) for appropriate audit configuration keys. Examples shown below: auditLog: destination: file format: BSON path: /var/log/mongodb/audit/auditLog.bson -OR- auditLog: destination: syslog If an auditLog key is not present, this is a finding. If the MongoDB configuration file does not contain a setParameter option with auditAuthorizationSuccess: true, this is a finding. Example: setParameter: auditAuthorizationSuccess: true If the auditLog key is present and contains a filter subkey without an associated filter, this is a finding. The site auditing policy must be reviewed to determine if the filter being applied meets the site auditing requirements. If not, then the filter being applied will need to be modified to comply. Example filter shown below only audits createCollection and dropCollection: auditLog: destination: file format: BSON path: /var/log/mongodb/audit/auditLog.bson filter: '{ atype: { $in: [ "createCollection", "dropCollection" ] } }'
Fix: F-55540r813783_fix
If the auditLog setting was not present in the %MongoDB configuration file% (default location: /etc/mongod.conf) edit this file and add a configured auditLog setting: auditLog: destination: file format: BSON path: /var/log/mongodb/audit/auditLog.bson Note: The "/var/log/mongodb/audit" directory will need to be created/present or the database will not start. Alternately, the audit logs can be written to syslog with the following setting: auditLog: destination: syslog This setting will record the following operations: schema (DDL), replica set and sharded cluster and authentication and authorization. To capture all operations in the audit, enable the audit system to log authorization successes by adding the following line to the /etc/mongod.conf file: setParameter: auditAuthorizationSuccess: true Stop/start (restart) the mongod or mongos instance using this configuration. If the auditLog setting was present and contained a filter parameter, ensure the filter expression does not prevent the auditing of events that should be audited or remove the filter parameter to enable auditing all events. Documentation on configuring filters can be found here: https://docs.mongodb.com/v4.4/tutorial/configure-audit-filters/
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- MD4X-00-000200
- Vuln IDs
-
- V-252135
- Rule IDs
-
- SV-252135r813787_rule
Checks: C-55591r813785_chk
MongoDB must not permit access to its audit logs by unprivileged users. The official installation packages restrict which operating system users and groups may read or modify files. The audit log destination is not configured or created at installation time and must be manually done with appropriate ownership and permissions applied with the MongoDB user and MongoDB group. Check the MongoDB configuration file (default location: /etc/mongod.conf) for a key named auditLog with destination set to file. Example shown below: auditLog: destination: file format: BSON path: /var/log/mongodb/audit/auditLog.bson -OR- auditLog: destination: syslog If auditLog does not exist, this is a finding. If the auditLog.destination is file in the MongoDB configuration file (default location /etc/mongod.conf), then the following will check ownership and permissions of the MongoDB auditLog directory: Verify User ownership, Group ownership, and permissions on the MongoDB auditLog directory: stat MongoDB auditLog directory If the User owner is not mongod, this is a finding. If the Group owner is not mongod, this is a finding. If the directory is more permissive than 700, this is a finding. To find the auditLog directory name, view and search for the entry in the MongoDB configuration file (default location /etc/mongod.conf) for auditLog.destination. If this parameters value is file then use the directory portion of the auditLog.path setting as the MongoDB auditLog directory location. Example: auditLog: destination: file format: BSON path: /var/log/mongodb/audit/auditLog.bson Given the example above, to find the auditLog directory ownership and permissions, run the following command: stat /var/log/mongodb/audit The output will look similar to the following output: File: '/var/log/mongodb/audit' Size: 48 Blocks: 0 IO Block: 4096 directory Device: 808h/2056d Inode: 245178 Links: 2 Access: (0700/drwx------) Uid: ( 997/ mongod) Gid: ( 996/ mongod) Context: unconfined_u:object_r:mongod_log_t:s0 Access: 2020-03-16 12:51:16.816000000 -0400 Modify: 2020-03-16 12:50:48.722000000 -0400 Change: 2020-03-16 12:50:48.722000000 -0400 Birth: -
Fix: F-55541r813786_fix
It is recommended to use the official installation packages provided by MongoDB. In the event the software was installed manually and permissions need to be restricted, consider a clean reinstallation. If the key name auditLog.destination is set to either syslog or console, then this requirement is not applicable as there is no physical directory that MongoDB can secure. Site security requirements and operating system security requirements will need to be reviewed to ensure appropriate settings for syslog and console destinations. To correct finding where a physical auditLog directory exists (where auditLog.destination is set to file), run these commands: chown mongod %MongoDB auditLog directory% chgrp mongod %MongoDB auditLog directory% chmod 700 %MongoDB auditLog directory% (The path for the %MongoDB auditLog directory% will vary according to local circumstances. The auditLog directory will be found in the %MongoDB configuration file% whose default location is /etc/mongod.conf.) To find the auditLog directory name, view and search for the entry in the %MongoDB configuration file% for the auditLog.path: Example: auditLog: destination: file format: BSON path: /var/log/mongodb/audit/auditLog.bson Given the example above, the %MongoDB auditLog directory% is /var/log/mongodb/audit.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-001493
- Version
- MD4X-00-000300
- Vuln IDs
-
- V-252136
- Rule IDs
-
- SV-252136r813790_rule
Checks: C-55592r813788_chk
To ensure audit configurations are protected from unauthorized modification, the default installation of MongoDB restricts permission on the configuration file. Verify User ownership, Group ownership, and permissions on the MongoDB configuration file: (default name and location is /etc/mongod.conf) (The name and location for the MongoDB configuration file will vary according to local circumstances.) Using the default name and location the command would be: stat /etc/mongod.conf If the User owner is not mongod, this is a finding. If the Group owner is not mongod, this is a finding. If the filename is more permissive than 660, this is a finding. Note that the audit destination cannot be modified at runtime.
Fix: F-55542r813789_fix
Run these commands: chown mongod %MongoDB configuration file% chgrp mongod %MongoDB configuration file% chmod 660 %MongoDB configuration file% (The name and location for the %MongoDB configuration file% will vary according to local circumstances. The default name and location is /etc/mongod.conf.) Using the default name and location the commands would be: chown mongod /etc/mongod.conf chgrp mongod /etc/mongod.conf chmod 660 /etc/mongod.conf The output of the command: stat /etc/mongod.conf should look similar to the following for a correctly owned and permissioned %MongoDB configuration file% (default /etc/mongod.conf): stat /etc/mongod.conf File:/etc/mongod.conf Size: 1034 Blocks: 8 IO Block: 4096 regular file Device: 802h/2050d Inode: 16340 Links: 1 Access: (0660/-rw-rw----) Uid: ( 997/ mongod) Gid: ( 996/ mongod) Context: system_u:object_r:etc_t:s0 Access: 2020-03-16 14:15:17.777000000 -0400 Modify: 2020-03-16 12:50:45.567000000 -0400 Change: 2020-03-16 14:27:32.451000000 -0400 Birth: -
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- MD4X-00-000400
- Vuln IDs
-
- V-252137
- Rule IDs
-
- SV-252137r813793_rule
Checks: C-55593r813791_chk
In the MongoDB database configuration file (default location: /etc/mongod.conf), review for the following option: net: http: enabled: true JSONPEnabled: true RESTInterfaceEnabled: true If the configuration file contains any combination of http settings under the net: option, this is a finding.
Fix: F-55543r813792_fix
MongoDB 3.6 removed the following deprecated HTTP interface and REST API to MongoDB. net.http.enabled net.http.JSONPEnabled net.http.port net.http.RESTInterfaceEnabled In the MongoDB database configuration file (default location: /etc/mongod.conf), remove the entire http option (and any sub-options) under the net: settings from the configuration file.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000382
- Version
- MD4X-00-000500
- Vuln IDs
-
- V-252138
- Rule IDs
-
- SV-252138r816978_rule
Checks: C-55594r816977_chk
Inspect the MongoDB database configuration file (default location: /etc/mongod.conf) for any net.http options similar in construct to the following: net: http: option 1: value option 2: value Example: It may appear similar to the following (having one or more options): net: http: enabled: true port: port number JSONPEnabled: true RESTInterfaceEnabled: true If the configuration file contains any "http:" options under "net:", this is a finding.
Fix: F-55544r813795_fix
MongoDB 3.6 removed the following deprecated HTTP interface and REST API to MongoDB and should not be used. net.http.enabled net.http.JSONPEnabled net.http.port net.http.RESTInterfaceEnabled In the MongoDB database configuration file (default location: /etc/mongod.conf), remove all http: options underneath net: from the configuration file.
- RMF Control
- IA-5
- Severity
- H
- CCI
- CCI-000197
- Version
- MD4X-00-000600
- Vuln IDs
-
- V-252139
- Rule IDs
-
- SV-252139r863317_rule
Checks: C-55595r813797_chk
In the MongoDB database configuration file (default location: /etc/mongod.conf), verify the following parameters in the net.tls: (network TLS) section of the file: net: tls: mode: requireTLS certificateKeyFile: /etc/ssl/mongodb.pem CAFile: /etc/ssl/caToValidateClientCertificates.pem allowInvalidCertificates: false allowConnectionsWithoutCertificates: false If the net.tls: parameter is not present, this is a finding. If the net.tls.certificateKeyFile parameter is not present, this is a finding. If the net.tls.CAFile parameter is not present, this is a finding. If the net.tls.allowInvalidCertificates parameter is found and set to true, this is a finding. If the net.tls.allowConnectionsWithoutCertificates parameter is found and set to true, this is a finding.
Fix: F-55545r863316_fix
In the MongoDB database configuration file (default location: /etc/mongod.conf), ensure the following parameters are present in the net.tls (network TLS) section of the file and are configured correctly for the site and server: net: tls: mode: requireTLS certificateKeyFile: /etc/ssl/mongodb.pem CAFile: /etc/ssl/caToValidateClientCertificates.pem allowInvalidCertificates: false allowConnectionsWithoutCertificates: false Stop/start (restart) the mongod or mongos instance using this configuration. More information for configuring TLS/SSL for MongoDB can be found here: https://docs.mongodb.com/v4.4/tutorial/configure-ssl/
- RMF Control
- SC-2
- Severity
- M
- CCI
- CCI-001082
- Version
- MD4X-00-000700
- Vuln IDs
-
- V-252140
- Rule IDs
-
- SV-252140r813802_rule
Checks: C-55596r813800_chk
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 roles' privileges: For each database, identify the privileges granted by a role: use database db.getRole( %rolename%, { 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.
Fix: F-55546r813801_fix
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, run the following: db.revokeRolesFromUser( %username%, [ roles ], { writeConcern } ) To grant a role to a user run the following: db.grantRolesToUser( %username%, [ roles ], { writeConcern } )
- RMF Control
- SC-24
- Severity
- M
- CCI
- CCI-001190
- Version
- MD4X-00-000800
- Vuln IDs
-
- V-252141
- Rule IDs
-
- SV-252141r813805_rule
Checks: C-55597r813803_chk
Journaling is enabled by default. With journaling enabled, if mongod stops unexpectedly, the program can recover everything written to the journal. MongoDB will re-apply the write operations on restart and maintain a consistent state. To validate the mongod configuration, run the following command: db.getSiblingDB("admin").runCommand({getCmdLineOpts: 1}).parsed.storage.journal If it returns { enabled : false } or no output, this is a finding.
Fix: F-55547r813804_fix
Modify the mongod startup command-line options by removing the --nojournal option. Edit the MongoDB database configuration file (default location: /etc/mongod.conf) to ensure the option storage.journal.enabled is present and set to true as show below: storage: journal: enabled: true Stop/start (restart) any or all mongod or mongos processes.
- RMF Control
- SC-4
- Severity
- M
- CCI
- CCI-001090
- Version
- MD4X-00-000900
- Vuln IDs
-
- V-252142
- Rule IDs
-
- SV-252142r817009_rule
Checks: C-55598r817008_chk
By default, the MongoDB official installation packages restrict user and group ownership and read/write permissions on the underlying data files and critical configuration files from other operating system users. In addition, process and memory isolation is used by default. System administrators should also consider if whole database encryption would be an effective control on an application basis. Run the following commands to verify proper permissions for the following database files or directories: stat /etc/mongod.conf If the owner and group are not both mongod, this is a finding. If the file permissions are more permissive than 600, this is a finding. stat /var/lib/mongo If the owner and group are not both mongod, this is a finding. If the file permissions are more permissive than 755, this is a finding. ls -l /var/lib/mongo If the owner and group of any file or sub-directory is not mongod, this is a finding. If the permission of any file in the main directory (/var/lib/mongo) or sub-directory of (/var/lib/mongo) is more permissive than 600, this is a finding. If the permission of any sub-directory of (/var/lib/mongo) is more permissive than 700, this is a finding.
Fix: F-55548r813807_fix
Correct the permission to the files and/or directories that are in violation. %MongoDB configuration file% (default location /etc/mongod.conf): chown mongod:mongod /etc/mongod.conf chmod 600 /etc/mongod.conf MongoDB datafiles and directories (default location /var/lib/mongo): chown -R mongod:mongod /var/lib/mongo chmod 755 /var/lib/mongo find /var/lib/mongo/* -type f | xargs chmod 600 find /var/lib/mongo/* -type d | xargs chmod 700
- RMF Control
- SI-10
- Severity
- M
- CCI
- CCI-001310
- Version
- MD4X-00-001000
- Vuln IDs
-
- V-252143
- Rule IDs
-
- SV-252143r813811_rule
Checks: C-55599r813809_chk
MongoDB operations permit arbitrary JavaScript expressions to be run directly on the server. If the following parameter is not present or not set as show below in the MongoDB configuration file (default location: /etc/mongod.conf), this is a finding. security: javascriptEnabled: false
Fix: F-55549r813810_fix
Disable the javascriptEnabled option. Edit the %MongoDB configuration file% (default location: /etc/mongod.conf) to include the following: security: javascriptEnabled: false
- RMF Control
- AC-16
- Severity
- M
- CCI
- CCI-002262
- Version
- MD4X-00-001100
- Vuln IDs
-
- V-252144
- Rule IDs
-
- SV-252144r855503_rule
Checks: C-55600r855501_chk
If security labeling is not required, this is not a finding. If security labeling is required, then there must be organizational or site-specific documentation on what the security labeling policy is and guidance on how and where to apply it. Review the organizational or site-specific security labeling documentation to understand how documents in specific MongoDB collection(s) must be marked. This marking process should be applied as data is entered into the database. Upon review of the security labeling documents, the following checks will be required. 1. Check if the role SLTagViewer exists. If this role does not exist this is a finding. Note: The role name SLTagViewer is a user-defined (custom) role and is organizational or site-specific. The role name of SLTagViewer is used here as an example. Run the following commands: use admin db.getRole( "SLTagViewer", { showPrivileges: true } ) If the results returned from this command is null, this is a finding. 2. Check that data is appropriately marked in the specific MongoDB collection(s) that require security labeling. This check will be specific to the security labeling policy and guidance. Log in to MongoDB with a user that has a Security Label Tag Viewer role (SLTagViewer, which is a role that has been created and has access to read/view those database/collections that require security labels) and review the data in the MongoDB collections that require security labels to ensure that the data is appropriately marked according to the security labeling documentation. For example, if documents in a MongoDB collection need to be marked as TS, S, C or U (or combination of) at the root level of the document and at each field level of the document then the security labeling policy and guidance would indicate a document might look like the following and this would be not be a finding (sl is the security label): { "_id": 1, "sl": [["TS", ["S"]], "field1" : { "sl" : [ ["S"] ], "data" : "field1 value" }, "field2" : { "sl" : [ ["TS"] ], "data" : "field2 value" }, "field3" : { "sl" : [ ["S"] ], "data" : "field3 value" } } The following document would be a finding because at the field level, field2 is missing its security label of sl: { "_id": 1, "sl": [["TS"], ["S"]], "field1" : { "sl" : [ ["S"] ], "data" : "field1 value" }, "field2" : { "data" : "field2 value" }, "field3" : { "sl" : [ ["S"] ], "data" : "field3 value" } } 3. Check that queries against that data in those collections use an appropriately constructed MongoDB $redact operation as part of the query pipeline to ensure that only the data appropriate for the query (that meets the security label requirements) is returned. Ensure that any query that targets the databases/collections that have security labeling have the appropriate MongoDB $redact operation applied. This is done through trusted middleware. This trusted middleware configuration is purpose built (custom) code and integrations and is organizational or site-specific. Information on the basics of how this is can be constructed can be found here: https://docs.mongodb.com/v4.4/reference/operator/aggregation/redact/ Any queries that target a MongoDB database/collection that has security labels and that pass through the trusted middleware and does not have an appropriately constructed $redact operator which is part of the query aggregation pipeline are a finding. The following is an example of the $redact operator for the example document: db.security_collection.aggregate( [{ $redact: { $cond: [{ $anyElementTrue: { $map: { input: "$sl", as: "setNeeded", in: { $setIsSubset: ["$$setNeeded", ["S"]] } } } }, "$$DESCEND", "$$PRUNE"] } } ] )
Fix: F-55550r855502_fix
If security labeling is required then ensure the following: 1. Organizational or site-specific documentation and guidance is available or developed. 2. Ensure that security labels are or have been applied to those MongoDB collection(s) requiring them in accordance with the organization or site specific documentation. 3. Create a Security Label Tag Viewer role (SLTagViewer) with find privileges on the specific database and collection that requires security labeling. The example below shows three databases and collections in those databases where security labels are required. use admin db.createRole( { role: "SLTagViewer", privileges: [ { resource: { db: "db1", collection: "coll1" }, actions: [ "find" ] }, { resource: { db: "db1", collection: "coll2" }, actions: [ "find" ] }, { resource: { db: "db1", collection: "coll3" }, actions: [ "find" ] }, { resource: { db: "db2", collection: "coll1" }, actions: [ "find" ] }, { resource: { db: "db2", collection: "coll5" }, actions: [ "find" ] }, { resource: { db: "db2", collection: "coll9" }, actions: [ "find" ] }, { resource: { db: "db3", collection: "coll81" }, actions: [ "find" ] } ], roles: [ ] }, { w: "majority" , wtimeout: 5000 } ) 4. Ensure that any query that targets the databases/collections that have security labeling have the appropriate MongoDB $redact operation applied. The $redact operator is applied through trusted middleware. This trusted middleware configuration is purpose-built (custom) code and integrations and is organizational or site-specific. Information on the basics of how this is can be constructed can be found here: https://docs.mongodb.com/v4.4/reference/operator/aggregation/redact/
- RMF Control
- AC-3
- Severity
- M
- CCI
- CCI-002165
- Version
- MD4X-00-001200
- Vuln IDs
-
- V-252145
- Rule IDs
-
- SV-252145r855504_rule
Checks: C-55601r813815_chk
Review the MongoDB Configuration file (default location: /etc/mongod.conf). If the file does not contain the following entry, this is a finding. security: authorization: enabled
Fix: F-55551r813816_fix
Enable authentication for MongoDB by following the instructions here: https://docs.mongodb.com/v4.4/tutorial/enable-authentication/ Create an administrative user in MongoDB: use admin db.createUser( { user: "UserAdmin", pwd: passwordPrompt(), // or cleartext password roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ] } ) Enable authorization by adding the following entry to the %MongoDB configuration file%: security: authorization: enabled Restart the MongoDB service from the OS. sudo service mongod restart The createUser and createRole MongoDB commands will be used to add the required users and roles per organizational or site-specific documentation. https://docs.mongodb.com/v4.4/reference/command/createUser/ https://docs.mongodb.com/v4.4/reference/command/createRole/
- RMF Control
- SC-13
- Severity
- H
- CCI
- CCI-002450
- Version
- MD4X-00-001300
- Vuln IDs
-
- V-252146
- Rule IDs
-
- SV-252146r863331_rule
Checks: C-55602r813818_chk
Run the following command from the MongoDB shell: db.getSiblingDB("admin").runCommand({getCmdLineOpts: 1}).parsed.net.tls.FIPSMode If the MongoDB server is running with FIPS mode, this command will return true. Any other output is a finding. Verify that FIPS has been enabled at the OS level. Refer to the appropriate OS STIG documentation.
Fix: F-55552r863330_fix
Enable FIPS mode for MongoDB Enterprise. Edit the MongoDB database configuration file (default location: /etc/mongod.conf) to contain the following parameter setting: net: tls: FIPSMode: true Stop/start (restart) the mongod or mongos instance using this configuration and run the following command to verify the output is true: db.getSiblingDB("admin").runCommand({getCmdLineOpts: 1}).parsed.net.tls.FIPSMode true Alternatively, run the following command to search the mongod logfile for FIPS 140-2 mode activated: grep "FIPS 140-2 mode activated" /var/log/mongodb/mongod.log For the operating system finding, refer to the appropriate operating system documentation for the procedure to install, configure, and test FIPS mode.
- RMF Control
- SC-28
- Severity
- M
- CCI
- CCI-002475
- Version
- MD4X-00-001400
- Vuln IDs
-
- V-252147
- Rule IDs
-
- SV-252147r855506_rule
Checks: C-55603r813821_chk
Review the system documentation to determine whether the organization has defined the information at rest that is to be protected from modification, which must include, at a minimum, PII and classified information. If no information is identified as requiring such protection, this is not a finding. If any data is PII, classified or is deemed by the organization the need to be encrypted at rest, verify the MongoDB configuration file (default location: /etc/mongod.conf) contain the following options: security: enableEncryption: true kmip: serverName: %KMIP Server HostName% port: %KMIP server port% ServerCAFile: %CA PEM file% clientCertificateFile: %client PEM file% If these above options are not part of the MongoDB configuration file, this is a finding. Items in the above are specific to the KMIP appliance and need to be set according to the KMIP appliance configuration.
Fix: F-55553r813822_fix
Configure MongoDB to use the Encrypted Storage Engine and a KMIP appliance as documented here: https://docs.mongodb.com/v4.4/core/security-encryption-at-rest/ https://docs.mongodb.com/v4.4/tutorial/configure-encryption/
- RMF Control
- AC-10
- Severity
- M
- CCI
- CCI-000054
- Version
- MD4X-00-001550
- Vuln IDs
-
- V-252148
- Rule IDs
-
- SV-252148r813826_rule
Checks: C-55604r813824_chk
Mongo can limit the total number of connections. Verify that the MongoDB configuration file (default location: /etc/mongod.conf) contains the following: net: maxIncomingConnections: %int% If this parameter is not present, or the OS is not utilized to limit connections, this is a finding.
Fix: F-55554r813825_fix
MongoDB can limit the total number of connections served by mongod process by setting the following in the MongoDB configuration file (default location: /etc/mongod.conf) net: maxIncomingConnections: %int% See the following documentation: https://docs.mongodb.com/v4.4/reference/configuration-options/ Products outside of MongoDB can be used to monitor database sessions and limit the maximum number of connections that can be made. Alternatively most UNIX-like operating systems, including Linux and macOS, provide ways to limit and control the usage of system resources such as threads, files, and network connections on a per-process and per-user basis. These ulimits prevent single users from using too many system resources. The following is the MongoDB documentation regarding these user limits: https://docs.mongodb.com/v4.4/reference/ulimit/
- RMF Control
- AC-2
- Severity
- H
- CCI
- CCI-000015
- Version
- MD4X-00-001600
- Vuln IDs
-
- V-252149
- Rule IDs
-
- SV-252149r863318_rule
Checks: C-55605r813827_chk
Verify that the MongoDB configuration file (default location: /etc/mongod.conf) contains the following: security: authorization: enabled If this parameter is not present, this is a finding. If using organization-mandated authorization, verify that the MongoDB configuration file (default location: /etc/mongod.conf) contains the following to ensure LDAP auth is enabled as well: security: ldap: servers: [list of ldap servers] If this parameter is not present, this is a finding.
Fix: F-55555r813828_fix
Edit the %MongoDB configuration file% (default location: /etc/mongod.conf) to include the following: security: authorization: enabled This will enable SCRAM-SHA-256 authentication (default). Instruction on configuring the default authentication is provided here: https://docs.mongodb.com/v4.4/tutorial/enable-authentication/ The high-level steps described by the above will require the following: 1. Start MongoDB without access control. 2. Connect to the instance. 3. Create the user administrator. 4. Restart the MongoDB instance with access control. 5. Connect and authenticate as the user administrator. 6. Create additional users as needed for deployment. Configuration information for LDAP for MongoDB can be found here: https://docs.mongodb.com/v4.4/core/security-ldap-external/ https://docs.mongodb.com/v4.4/core/security-ldap-external/#configuration
- RMF Control
- AC-3
- Severity
- H
- CCI
- CCI-000213
- Version
- MD4X-00-001700
- Vuln IDs
-
- V-252150
- Rule IDs
-
- SV-252150r863319_rule
Checks: C-55606r813830_chk
The MongoDB administrator must ensure that additional application access control is enforced. Review the system documentation to determine the required levels of protection for MongoDB server securables by type of login. Review the permissions actually in place on the server. If the actual permissions do not match the documented requirements, this is a finding. Run MongoDB command to view roles and privileges in a particular database: use database db.getRoles( { rolesInfo: 1, showPrivileges:true, showBuiltinRoles: true } )
Fix: F-55556r813831_fix
Use createRole(), updateRole(), dropRole(), grantRole() statements to add and remove permissions on MongoDB serverl securables, bringing them into line with the documented requirements. MongoDB commands for role management can be found here: https://docs.mongodb.com/v4.4/reference/method/js-role-management/
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- MD4X-00-002000
- Vuln IDs
-
- V-252151
- Rule IDs
-
- SV-252151r813835_rule
Checks: C-55607r813833_chk
Review monitoring procedures and implementation evidence to verify monitoring of changes to database software libraries, related applications, and configuration files occurs. Verify the list of files, directories, and database application objects (procedures, functions, and triggers) being monitored is complete. If monitoring does not occur or is not complete, this is a finding.
Fix: F-55557r813834_fix
Implement procedures to monitor for unauthorized changes to DBMS software libraries, related software application libraries, and configuration files. If a third-party automated tool is not employed, an automated job that reports file information on the directories and files of interest and compares them to the baseline report for the same will meet the requirement. Examples of such products are Puppet, Chef, or Ansible. Alternately, scripts can also be written to inspect the database software libraries, related applications, and configuration files to detect changes and to take appropriate actions or notifications if changes are detected. Use file hashes or checksums for comparisons, as file dates may be manipulated by malicious users.
- RMF Control
- CM-5
- Severity
- H
- CCI
- CCI-001499
- Version
- MD4X-00-002100
- Vuln IDs
-
- V-252152
- Rule IDs
-
- SV-252152r863320_rule
Checks: C-55608r813836_chk
Review procedures for controlling, granting access to, and tracking use of the DBMS software installation account. If access or use of this account is not restricted to the minimum number of personnel required or if unauthorized access to the account has been granted, this is a finding.
Fix: F-55558r813837_fix
Develop, document, and implement procedures to restrict and track use of the DBMS software installation account.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- MD4X-00-002200
- Vuln IDs
-
- V-252153
- Rule IDs
-
- SV-252153r813841_rule
Checks: C-55609r813839_chk
By default MongoDB, runs using mongod user account (both user and group) and uses the following default directories: MongoDB created directories (default): /var/lib/mongo (the data directory) /var/lib/mongo/diagnostic.data /var/lib/mongo/_tmp /var/lib/mongo/journal /var/log/mongodb (the mongod process log directory) /var/log/mongodb/audit (the auditLog directory) Standard directories: /bin (the executable directory) /etc (the configuration file directory) Check if any non-MongoDB application, non-MongoDB data, or non-MongoDB directories exists under any of the MongoDB created directories or sub-directories. If any non-MongoDB application, non-MongoDB data, or non-MongoDB directories exists under the MongoDB-created directories, this is a finding.
Fix: F-55559r813840_fix
The official installation packages from MongoDB segregates MongoDB executable software from MongoDB data directories by default. For any non-MongoDB application found, reinstall that application to use directories that are not under the MongoDB-created directories. For any non-MongoDB application that stores data under the MongoDB created directories, reinstall the application and configure the application to use non-MongoDB-created directories to store its data. For any non-MongoDB data that is found under the MongoDB created directories that cannot be associated with a MongoDB application, move or delete that data from the MongoDB-created directories.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- MD4X-00-002300
- Vuln IDs
-
- V-252154
- Rule IDs
-
- SV-252154r813844_rule
Checks: C-55610r813842_chk
Run the following command to get the roles from a MongoDB database. For each database in MongoDB: use database db.getUsers() If the output shows a role of "dbOwner", this is a finding.
Fix: F-55560r813843_fix
For each user where the role of dbOwner is found verify whether or not the user is authorized for this role on the resources listed. This information will be found in the organizational or site-specific documentation. If a user if found not authorized to have the role dbOwner the remove that role from the user with the db.revokeRolesFromUser() command https://docs.mongodb.com/v4.4/reference/command/revokeRolesFromUser/
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- MD4X-00-002400
- Vuln IDs
-
- V-252155
- Rule IDs
-
- SV-252155r813938_rule
Checks: C-55611r813845_chk
Run the following command to get the roles from a MongoDB database. For each database in MongoDB: use database db.getRoles( { rolesInfo: 1, showPrivileges:true, showBuiltinRoles: true } ) Run the following command to the roles assigned to users: use admin db.system.users.find() Analyze the output and if any roles or users have unauthorized access, this is a finding. This will vary on an application basis.
Fix: F-55561r813846_fix
Use the following commands to remove unauthorized access to a MongoDB database. db.revokePrivilegesFromRole() db. revokeRolesFromUser() MongoDB commands for role management can be found here: https://docs.mongodb.com/v4.4/reference/method/js-role-management/
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- MD4X-00-002600
- Vuln IDs
-
- V-252156
- Rule IDs
-
- SV-252156r813850_rule
Checks: C-55612r813848_chk
In the MongoDB database configuration file (default location: /etc/mongod.conf), review the following parameters: net: http: enabled: true JSONPEnabled: true RESTInterfaceEnabled: true If any of the booleans are true or enabled, this is a finding.
Fix: F-55562r813849_fix
In the MongoDB database configuration file (default location: /etc/mongod.conf), ensure the following parameters either: Does not exist in the file OR Are set to false as shown below: http: enabled: false JSONPEnabled: false RESTInterfaceEnabled: false
- RMF Control
- IA-2
- Severity
- M
- CCI
- CCI-000764
- Version
- MD4X-00-002800
- Vuln IDs
-
- V-252157
- Rule IDs
-
- SV-252157r813853_rule
Checks: C-55613r813851_chk
For each database in the system, run the following command: use database db.getUsers() Ensure each user identified is a member of an appropriate organization that can access the database. Alternatively, if LDAP/AD is being used for authentication/authorization, the mongoldap tool can be used to verify user account access. If a user is found not be a member of an appropriate organization that can access the database, this is a finding. Verify that the MongoDB configuration file (default location: /etc/mongod.conf) contains the following: security: authorization: enabled If this parameter is not present, this is a finding.
Fix: F-55563r813852_fix
For any user not a member of an appropriate organization and has access to a database in the system, run the following command: use database db.dropUser(%username%, {w: "majority", wtimeout: 5000}) If the %MongoDB configuration file% (default location: /etc/mongod.conf) does not contain security: authorization: enabled Edit the %MongoDB configuration file%, add these parameters, stop/start (restart) any mongod or mongos process using this %MongoDB configuration file%.
- RMF Control
- IA-5
- Severity
- H
- CCI
- CCI-000192
- Version
- MD4X-00-002950
- Vuln IDs
-
- V-252158
- Rule IDs
-
- SV-252158r863321_rule
Checks: C-55614r813854_chk
If MongoDB is using Native LDAP authentication where the LDAP server is configured to enforce password complexity and lifetime, this is not a finding. If MongoDB is using Kerberos authentication where Kerberos is configured to enforce password complexity and lifetime, this is not a finding. If MongoDB is not configured for SCRAM-SHA1, MONGODB-CR, or LDAP authentication, this is a finding.
Fix: F-55564r813855_fix
Password complexity and lifetime must be enforced by an external authentication source such as LDAP, Active Directory, or Kerberos. Information on configuring MongoDB for one of these authentication mechanisms be found here: LDAP/Active Directory: https://docs.mongodb.com/v4.4/tutorial/authenticate-nativeldap-activedirectory/ Kerberos: https://docs.mongodb.com/v4.4/tutorial/control-access-to-mongodb-with-kerberos-authentication/
- RMF Control
- IA-5
- Severity
- H
- CCI
- CCI-000196
- Version
- MD4X-00-003000
- Vuln IDs
-
- V-252159
- Rule IDs
-
- SV-252159r863324_rule
Checks: C-55615r863322_chk
MongoDB supports several authentication mechanisms, some of which store credentials on the MongoDB server. If these mechanisms are in use, MongoDBs authSchemaVersion in the admin.system.version collection must be set to 5. 1. Validate that authenticationMechansisms is defined in config file (default location /etc/mongod.conf). The MongoDB Configuration file should contain the similar to the following entry: setParameter: authenticationMechanisms: SCRAM-SHA-256 If the config file does not contain an authenticationMechanisms entry, this is a finding. 2. Validate authSchemaVersion is set to 5. Using the shell, run the following command: db.getSiblingDB("admin").system.version.find({ "_id" : "authSchema"}, {_id: 0}) It should return: { "currentVersion" : 5 } If currentVersion is less than 5, this is a finding.
Fix: F-55565r863323_fix
1. If authenticationMechanisms is not defined in the %MongoDB configuration file% (default location: /etc/mongod.conf), define one of more authenticationMechanisms, from the subset below: SCRAM-SHA-1 SCRAM-SHA-256 MONGODB-X509 GSSAPI PLAIN which the MongoDB server process must accept. Example: setParameter: authenticationMechanisms: SCRAM-SHA-1,SCRAM-SHA-256 2. If authSchemaVersion is less than 5. Run the following command: db.adminCommand({authSchemaUpgrade: 1}) In the unlikely event that an error is encountered, safely rerun the authSchemaUpgrade command.
- RMF Control
- IA-5
- Severity
- H
- CCI
- CCI-000186
- Version
- MD4X-00-003100
- Vuln IDs
-
- V-252160
- Rule IDs
-
- SV-252160r863325_rule
Checks: C-55616r813860_chk
In the MongoDB database configuration file (default location: /etc/mongod.conf), review the following parameters: net: tls: mode: requireTLS certificateKeyFile: /etc/ssl/mongodb.pem CAFile: /etc/ssl/caToValidateClientCertificates.pem Verify ownership, group ownership, and permissions for the MongoDB config file (default: /etc/mongod.conf), the PEMKeyFile (default /etc/ssl/mongodb.pem), and the CAFile (default /etc/ssl/caToValidateClientCertificates.pem). For each file, run following command and review its output: ls -al filepath example output: -rw------- 1 mongod mongod 566 Apr 26 20:20 filepath If the user owner is not mongod, this is a finding. If the group owner is not mongod, this is a finding. If the file is more permissive than 600, this is a finding.
Fix: F-55566r813861_fix
To set proper ownership, group ownership, and permissions, run these commands: chown mongod:mongod /etc/ssl/mongodb.pem chmod 600 /etc/ssl/mongodb.pem chown mongod:mongod /etc/ssl/caToValidateClientCertificates.pem chmod 600 /etc/ssl/caToValidateClientCertificates.pem
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-000187
- Version
- MD4X-00-003200
- Vuln IDs
-
- V-252161
- Rule IDs
-
- SV-252161r813865_rule
Checks: C-55617r813863_chk
If using LDAP for authentication, this is not applicable. Each unique x.509 client certificate corresponds to a single MongoDB user; meaning it cannot use a single-client certificate to authenticate more than one MongoDB user. Log in to MongoDB and run the following command: db.runCommand( {connectionStatus: 1} ); Example output being: db.runCommand({connectionStatus:1}).authInfo { "authenticatedUsers" : [ { "user" : "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry", "db" : "mydb1" } ], "authenticatedUserRoles" : [ { "role" : dbOwner, "db" : "mydb1" } ] } If the authenticated MongoDB user displayed does not have a user value equal to the x.509 certs Subject Name, this is a finding.
Fix: F-55567r813864_fix
Add x.509 Certificate subject as an authorized user. To authenticate with a client certificate, first add the value of the subject from the client certificate as a MongoDB user. Each unique x.509 client certificate corresponds to a single MongoDB user; meaning it cannot use a single-client certificate to authenticate more than one MongoDB user. Note: The RDNs in the subject string must be compatible with the RFC2253 standard. Retrieve the RFC2253 formatted subject from the client certificate with the following command: openssl x509 -in pathToClient PEM -inform PEM -subject -nameopt RFC2253 The command returns the subject string as well as certificate: subject= CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry -----BEGIN CERTIFICATE----- # ... -----END CERTIFICATE----- Add the RFC2253 compliant value of the subject as a user. Omit spaces as needed. For example, in the mongo shell, to add the user with both the readWrite role in the test database and the userAdminAnyDatabase role which is defined only in the admin database: db.getSiblingDB("$external").runCommand( { createUser: "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry", roles: [ { role: readWrite, db: test }, { role: userAdminAnyDatabase, db: admin } ], writeConcern: { w: "majority" , wtimeout: 5000 } } ) In the above example, to add the user with the readWrite role in the test database, the role specification document specified test in the db field. To add userAdminAnyDatabase role for the user, the above example specified admin in the db field. Note: Some roles are defined only in the admin database, including: clusterAdmin, readAnyDatabase, readWriteAnyDatabase, dbAdminAnyDatabase, and userAdminAnyDatabase. To add a user with these roles, specify admin in the db field. See Manage Users and Roles for details on adding a user with roles. To remove a user that is not authorized run the following command: use $external db.dropUser(%RDN of user%)
- RMF Control
- IA-6
- Severity
- H
- CCI
- CCI-000206
- Version
- MD4X-00-003300
- Vuln IDs
-
- V-252162
- Rule IDs
-
- SV-252162r863326_rule
Checks: C-55618r813866_chk
Restrict the environment to tools which meet this requirement. For the MongoDB command-line tools mongo shell, mongodump, mongorestore, mongoimport, mongoexport, which cannot be configured not to obfuscate a plain-text password, and any other essential tool with the same limitation; verify that the system documentation explains the need for the tool, who uses it, and any relevant mitigations and that AO approval has been obtained. If it is not documented, this is a finding. Request evidence that all users of MongoDB command-line tools are trained in the use of the -p option/plain-text password option and how to keep the password protected from unauthorized viewing/capture, and that they adhere to this practice. If evidence of training does not exist, this is a finding.
Fix: F-55568r813867_fix
For the mongo shell, mongodump, mongorestore, mongoimport, mongoexport, which can accept a plain-text password, and any other essential tool with the same limitation: Document the need for it, who uses it, and any relevant mitigations, and obtain AO approval. Train all users of the tool in the nature of using the plain-text password option and in how to keep the password protected from unauthorized viewing/capture and document they have been trained.
- RMF Control
- IA-8
- Severity
- M
- CCI
- CCI-000804
- Version
- MD4X-00-003400
- Vuln IDs
-
- V-252163
- Rule IDs
-
- SV-252163r817011_rule
Checks: C-55619r817010_chk
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, one may create user-defined roles. Check a user's role to ensure correct privileges for the function: Prereq: To view a user's roles, you must have the viewUser privilege. Connect to MongoDB. For each database in the system, identify the user's roles for the database: use database db.getUser(%username%) The server will return a document with the user's roles. View a roles' privileges: Prereq: To view a user's roles, you must have the viewUser privilege. For each database, identify the privileges granted by a role: use database db.getRole( "read", { 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.
Fix: F-55569r813870_fix
Administrators using MongoDB should document the appropriate privileges for various roles appropriate to the application. Prereq: To view a user's roles, must have the viewUser privilege. Connect to MongoDB. 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 db.revokeRolesFromUser() method. To grant a role to a user use the db.grantRolesToUser(...) method.
- RMF Control
- SC-23
- Severity
- M
- CCI
- CCI-001188
- Version
- MD4X-00-003700
- Vuln IDs
-
- V-252164
- Rule IDs
-
- SV-252164r863328_rule
Checks: C-55620r863327_chk
Check the MongoDB configuration file (default location: /etc/mongod.conf). The following option must be present (net.tls.mode) and set to requireTLS: net: tls: mode: requireTLS If this is not found in the MongoDB configuration file, this is a finding.
Fix: F-55570r813873_fix
Edit the %MongoDB configuration file% to ensure the net.tls.mode option is included and set to the value requireTLS as shown below: net: tls: mode: requireTLS Stop/start (restart) and mongod or mongos using the %MongoDB configuration file%. Further documentation is here: https://docs.mongodb.com/v4.4/tutorial/configure-ssl/.
- RMF Control
- SC-28
- Severity
- H
- CCI
- CCI-001199
- Version
- MD4X-00-003800
- Vuln IDs
-
- V-252165
- Rule IDs
-
- SV-252165r863329_rule
Checks: C-55621r813875_chk
To provide integrity and confidentiality for data at rest, MongoDB must be configured to use the Encrypted Storage Engine. Run the following command to verify whether or not the Encrypted Storage Engine is enabled: db.serverStatus().encryptionAtRest.encryptionEnabled Any output other than true is a finding. Next, validate whether the Encrypted Storage Engine is running with an AEAD block cipher, which provides integrity, by running the following command: db.serverStatus().encryptionAtRest.encryptionCipherMode Any response other than AES256-GCM is a finding. Finally, validate that the system is configured to use KMIP to obtain a master encryption key, rather than storing the master key on the local filesystem. Run: db.serverStatus().encryptionAtRest.encryptionKeyId If the response is local or no response, this is a finding.
Fix: F-55571r813876_fix
Enable the Encrypted Storage Engine with KMIP as the key storage mechanism and AES256-GCM as the encryption mode. Consult MongoDB documentation for encryption setup instruction here: https://docs.mongodb.com/v4.4/tutorial/configure-encryption/
- RMF Control
- SC-4
- Severity
- M
- CCI
- CCI-001090
- Version
- MD4X-00-004000
- Vuln IDs
-
- V-252166
- Rule IDs
-
- SV-252166r813880_rule
Checks: C-55622r813878_chk
Review the procedures for the refreshing of development/test data from production. Review any scripts or code that exists for the movement of production data to development/test systems, or to any other location or for any other purpose. Verify that copies of production data are not left in unprotected locations. If the code that exists for data movement does not comply with the organization-defined data transfer policy and/or fails to remove any copies of production data from unprotected locations, this is a finding.
Fix: F-55572r813879_fix
Modify any code used for moving data from production to development/test systems to comply with the organization-defined data transfer policy, and to ensure copies of production data are not left in unsecured locations.
- RMF Control
- SI-10
- Severity
- M
- CCI
- CCI-001310
- Version
- MD4X-00-004100
- Vuln IDs
-
- V-252167
- Rule IDs
-
- SV-252167r813883_rule
Checks: C-55623r813881_chk
As a client program assembles a query in MongoDB, it builds a BSON object, not a string. Thus, traditional SQL injection attacks are not a problem. However, MongoDB operations permit arbitrary JavaScript expressions to be run directly on the server. To check, run the following command from the MongoDB shell: db.col.find({ $where: "return true;"} ) If the response does not return an error, this is a finding. If JavaScript has been correctly disabled, the correct error would indicate that the JavaScript global engine has been disabled, e.g.: Error: error: { "ok" : 0, "errmsg" : "no globalScriptEngine in $where parsing", "code" : 2, "codeName" : "BadValue" }
Fix: F-55573r813882_fix
Disable the javascriptEnabled option in the %MongoDB configuration file% (default location: /etc/mongod.conf) to include the following: security: javascriptEnabled: false If document validation is needed, it should be configured according to the documentation page at: https://docs.mongodb.com/v4.4/core/schema-validation/
- RMF Control
- SI-11
- Severity
- M
- CCI
- CCI-001312
- Version
- MD4X-00-004200
- Vuln IDs
-
- V-252168
- Rule IDs
-
- SV-252168r813886_rule
Checks: C-55624r813884_chk
Check custom application code to verify that error messages do not contain information beyond what is needed for troubleshooting the issue. If custom application error messages contain PII data, sensitive business data, or information useful for identifying the host system or database structure, this is a finding. For example, when attempting to login using the MongoDB shell with incorrect client credentials, the user will receive a generic error message that the authentication failed regardless of whether the user exists or not. If a user is attempting to perform an operation using the MongoDB shell for which they do not have privileges, MongoDB will return a generic error message that the operation is not authorized. To identify the level of information being displayed in the MongoDB logfiles, run the following command: db.getSiblingDB("admin").runCommand({getCmdLineOpts: 1}).parsed.security.redactClientLogData If the command does not return true, this is a finding.
Fix: F-55574r813885_fix
Configure custom application code so as not to divulge sensitive information or information useful for system identification in custom application error messages. To configure MongoDB to redact client information from its log file do the following: Edit the %MongoDB configuration file% (default location: /etc/mongod.conf) Add the following option to the security section: security: redactClientLogData: true Restart the MongoDB server from the operating system: sudo service mongod restart
- RMF Control
- SI-11
- Severity
- M
- CCI
- CCI-001314
- Version
- MD4X-00-004300
- Vuln IDs
-
- V-252169
- Rule IDs
-
- SV-252169r813889_rule
Checks: C-55625r813887_chk
A mongod or mongos running with security.redactClientLogData:true redacts any message accompanying a given log event before logging. This prevents the mongod or mongos from writing potentially sensitive data stored on the database to the diagnostic log. Metadata such as error or operation codes, line numbers, and source file names are still visible in the logs. To identify the level of information being displayed in the MongoDB logfiles run the following command: db.getSiblingDB("admin").runCommand({getCmdLineOpts: 1}).parsed.security.redactClientLogData If the command does not return true this is a finding. The MongoDB command getLog is an administrative command that will return the most recent 1024 logged mongod events. Ensure that application users are not authorized to execute this command. To validate this run the following command on the name of the application user to see actions its permitted to perform on the cluster resource: db.runCommand({usersInfo: %username%, showPrivileges: 1}).users[0].inheritedPrivileges.filter(privilege = privilege.resource.cluster) If getLog appears in the list of actions, this is a finding.
Fix: F-55575r813888_fix
Edit the %MongoDB configuration file% (default location: /etc/mongod.conf) and add the following parameter redactClientLogData in the security section of that file: security: redactClientLogData: true Stop/start (restart) any mongod or mongos using the %MongoDB configuration file%. Identify and remove any administrative roles and privileges from application users.
- RMF Control
- AC-12
- Severity
- M
- CCI
- CCI-002361
- Version
- MD4X-00-004400
- Vuln IDs
-
- V-252170
- Rule IDs
-
- SV-252170r855507_rule
Checks: C-55626r813890_chk
Review system documentation to obtain the organization's definition of circumstances requiring automatic session termination. If the documentation explicitly states that such termination is not required or is prohibited, this is not a finding. If the system owner, data owner, or organization requires additional assurance, this is a finding.
Fix: F-55576r813891_fix
Determine the situations when a user-initiated database session must be terminated. Note: The user running the commands shown below must have privileges with listSessions, killAnySession and impersonate action on the cluster. In the MongoDB shell, as an authenticated user, run the following command to list all user sessions use config db.system.sessions.aggregate( [ { $listSessions: { allUsers: true } } Reference: https://docs.mongodb.com/v4.4/reference/operator/aggregation/listSessions/ Example output: { "_id" : { "id" : UUID("b3b50641-54c6-4d6d-a96e-a2239fadce3c"), "uid" : BinData(0,"Y5mrDaxi8gv8RmdTsQ+1j7fmkr7JUsabhNmXAheU0fg=") }, "lastUse" : ISODate("2021-09-23T23:34:43.951Z"), "user" : { "name" : "jsmith@admin" } } From the output identify the names of users whose sessions should be terminated. Using the user for each session to be terminated, run the following command (still in MongoDB shell). db.runCommand( { killAllSessionsByPattern: [ { users: [ { user: <user>, db: <dbname> }, ... ] }] } ) Example to terminate user "jsmith@admin" sessions from example output:: db.runCommand( { killAllSessionsByPattern: [ { users: [ { user: "jsmith", db: "admin" } ] }] } ) To terminate all user sessions running on the database, run the following command (still in MongoDB shell): db.runCommand( { killAllSessionsByPattern: [ ] } ) Reference: https://docs.mongodb.com/v4.4/reference/command/killAllSessionsByPattern/
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-001844
- Version
- MD4X-00-004800
- Vuln IDs
-
- V-252171
- Rule IDs
-
- SV-252171r855508_rule
Checks: C-55627r813893_chk
Administrators can implement collection-level access control through user-defined roles. By creating a role with privileges that are scoped to a specific collection in a particular database, administrators can provision users with roles that grant privileges on a collection level. For example, a user defined role can contain the following privileges: Once enabled, the auditing system can record the following operations: schema changes (DDL), replica set and sharded cluster, authentication and authorization, and CRUD operations (requires auditAuthorizationSuccess set to true). For details on audited actions, see MongoDB documentation on the complete configuration of Audit Event Actions, Details, and Results, and Configuring Audit Filters. To ensure auditing is enabled, confirm the auditLog section in the /etc/mongod.conf configuration file exists and has been set. For example, to enable syslog centralized logging of audit events, in the MongoDB configuration file (by default: /etc/mongod.conf) verify the destination type is set as: auditLog: destination: file format: BSON path: /var/log/mongodb/audit/auditLog.bson -OR- auditLog: destination: syslog If this is not present, is empty, or commented, this is a finding. Review the system documentation for a description of how audit records are off-loaded and how local audit log space is managed. If the DBMS audit records are not written directly to or systematically transferred to a centralized log management system, this is a finding.
Fix: F-55577r813894_fix
If audit operations filters are not configured in the MongoDB configuration file (default location: /etc/mongod.conf), configure them according to application requirements, but at a minimum, ensure destination and filter are set in a mongod.conf YAML auditLog configuration setting. For example, to audit all database operations involving creating or dropping a collection, the %MongoDB configuration file% (by default /etc/mongod.conf) auditLog section would read as follows: auditLog: destination: file format: BSON path: /var/log/mongodb/audit/auditLog.bson filter: '{ atype: { $in: [ "createCollection", "dropCollection" ] } }' See mongodb documentation for details of audit operations and event configuration. https://docs.mongodb.com/v4.4/core/auditing/ https://docs.mongodb.com/v4.4/tutorial/configure-audit-filters/ Configure and/or deploy software tools to ensure that DBMS audit records are written directly to or systematically transferred to a centralized log management system.
- RMF Control
- AU-4
- Severity
- M
- CCI
- CCI-001849
- Version
- MD4X-00-004900
- Vuln IDs
-
- V-252172
- Rule IDs
-
- SV-252172r855509_rule
Checks: C-55628r813896_chk
MongoDB relies on the underlying operating system to allocate storage capacity for audit logs and as such, does not enforce arbitrary file size limits on audit logs. System administrators should confirm that the recommended centralized system logging has been enabled (e.g., syslog on Linux systems) in the /etc/mongod.conf configuration file. For example, on a Linux-based system using syslog which is mirrored to an off-server centralized location, confirm that the MongoDB configuration file (default location: /etc/mongod.conf) contains a properly configured auditLog such as follows: auditLog: destination: syslog If the auditLog entry is missing, or the destination does not reflect the intended application location, this is a finding. Investigate whether there have been any incidents where MongoDB ran out of audit log space since the last time the space was allocated or other corrective measures were taken. If there have been incidents where MongoDB ran out of audit log space, this is a finding.
Fix: F-55578r813897_fix
If an auditLog has not been specified, or a centralized system log (which is recommended) has not been enabled, configure these in the mongod.conf configuration file: auditLog: destination: syslog See documentation for additional configuration: https://docs.mongodb.com/v4.4/tutorial/configure-auditing/ Allocate sufficient space to the storage volume hosting the file identified in the MongoDB configuration "auditLog.path" to support audit file peak demand.
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-001855
- Version
- MD4X-00-005000
- Vuln IDs
-
- V-252173
- Rule IDs
-
- SV-252173r855510_rule
Checks: C-55629r813899_chk
Verify that auditing is enabled in the mongodb configuration file (default location: /etc/mongod.conf) and view the auditlog.path to identify the storage volume. This is only applicable where the auditLog.destination is set to file. Verify that MongoDB Ops Manager or other organization approved monitoring software is installed. Verify that the required alert in the monitoring software to send an alert where storage volume holding the auditLog file utilization reaches 75 percent. If appropriate support staff are not notified immediately upon storage volume utilization reaching 75 percent, this is a finding.
Fix: F-55579r813900_fix
View the %MongoDB configuration file% (default location: /etc/mongod.conf) and view the auditlog.path to identify the storage volume. Install MongoDB Ops Manager or other organization-approved monitoring software. Configure the required alert in the monitoring software to send an alert where storage volume holding the auditLog file utilization reaches 75 percent.
- RMF Control
- CM-11
- Severity
- M
- CCI
- CCI-001812
- Version
- MD4X-00-005300
- Vuln IDs
-
- V-252174
- Rule IDs
-
- SV-252174r855512_rule
Checks: C-55630r855511_chk
If MongoDB supports only software development, experimentation and/or developer-level testing (that is, excluding production systems, integration testing, stress testing, and user acceptance testing), this is not a finding. MongoDB only supports views and Change Streams (similar to triggers). Stored procedures and functions that are commonly found in relational databases are not supported by MongoDB. Connect to MongoDB and authenticate as a user that has Database Administrator privileges. Check each user of the database to verify that only authorized administrative users are granted the following privileges: createCollection and changeStream Run the following command to get a list of all the databases in the system: show dbs For each database in the system, identify any non-administrative users 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. Organizational or site-specific documentation should identify which administrative and non-administrative users exist. For each role that a non-administrative user has in the database find the privileges each role has: db.getRole(rolename, { showPrivileges: true }) If any non-administrative user has a role that where the resource has the action of createCollections or changeStream this is a finding.
Fix: F-55580r813903_fix
Document and obtain approval for any non-administrative users to have roles that contain createCollections or changeSteam actions on resources. For any non-administrative user that does not have approval, revoke these specific privileges from that non-administrative users role. Run the following commands in each database and for each non-administrative user that does not have approval to use the createCollections or changeStream actions on MongoDB resources: use database db.revokePrivilegesFromRole( rolename, [ { resource: { resource }, actions: [ action, ... ] }, ... ], { writeConcern } ) In the above command the action will be either createCollections or changeStream. There may be several resources in a role that contain these privileges and the removal process will require running the following command for each one.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001813
- Version
- MD4X-00-005400
- Vuln IDs
-
- V-252175
- Rule IDs
-
- SV-252175r855515_rule
Checks: C-55631r855513_chk
To verify that access restrictions are being enforced, create a test user and a custom role and then confirm expected operations: Once authenticated as a DBA administrator, use db.createUser() to create an additional user. The following operation adds a user myTester to the test database who has read-only access on the test database: use test db.createUser( { user: "myTester", pwd: password, roles: [ { role: "read", db: "test" } ] } ) Log out, then log back in as the "test" database user. Issue the following to attempt to write to the test database with a read-only privilege: use test db.testCollection.insert( { x: 1 } ) This operation will fail with a WriteResult error: WriteCommandError({ "ok" : 0, "errmsg" : "not authorized on test to execute command { insert: \"###\", ordered: \"###\", lsid: { id: \"###\" }, $db: \"###\" }", "code" : 13, "codeName" : "Unauthorized" }) If the operation does not fail, this is a finding.
Fix: F-55581r855514_fix
Verify that authentication has been enabled in the %MongoDB configuration file%: https://docs.mongodb.com/v4.4/reference/configuration-options/. If authorization is enabled, review the following to list existing user permissions. https://docs.mongodb.com/v4.4/reference/privilege-actions/ Connect to MongoDB. For each database (show dbs), 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 method below: db.revokeRolesFromUser( %username%, [ roles ], { writeConcern } ) https://docs.mongodb.com/v4.4/reference/method/db.revokeRolesFromUser/ To grant a role to a user, use the method below: db.grantRolesToUser( %username%, [ roles ], { writeConcern } ) https://docs.mongodb.com/v4.4/reference/method/db.grantRolesToUser/
- RMF Control
- IA-11
- Severity
- M
- CCI
- CCI-002038
- Version
- MD4X-00-005600
- Vuln IDs
-
- V-252176
- Rule IDs
-
- SV-252176r855517_rule
Checks: C-55632r855516_chk
MongoDB Enterprise supports PKI x.509 certificate bearer authentication. The duration of a user's logical session is application-specific, but is verified on initial network session connection. Additional user authentication controls can be enabled on a client basis (including Windows OS-level CAC + PIN flow; see operating system documentation for specific configuration). By specifying both the database and the collection in the resource document for a privilege, administrator can limit the privilege actions just to a specific collection in a specific database. Each privilege action in a role can be scoped to a different collection. When a new privilege is applied to an object, such as a particular collection or a database, authorization to access that object is verified at run-time (i.e., in real time). To check that authorization is being enforced, see the documentation for Collection-Level Access Control and custom user roles (https://docs.mongodb.com/v4.4/core/collection-level-access-control/) and create a new role with the following permissions, e.g.: use admin db.createRole( { role: "myTestRole", privileges: [ { resource: { db: "products", collection: "inventory" }, actions: [ "find", "update", "insert" ] }, { resource: { db: "products", collection: "orders" }, actions: [ "find" ] } ], roles: [ ] }, { w: "majority" , wtimeout: 5000 } ) Assign that privilege to one or more users. use products db.createUser({user: "myRoleTestUser", pwd: "password1", roles: ["myTestRole"]}) Log in as "myRoleTestUser" user and attempt find(), insert() and delete() operations on a test inventory and orders collection. The following commands will succeed: use products db.inventory.insert({a: 1}) db.inventory.find() db.inventory.update({a:1}, {$set: {"updated": true}}) Example output of the above commands: use products switched to db products db.inventory.find() db.inventory.insert({a: 1}) WriteResult({ "nInserted" : 1 }) db.inventory.update({a:1}, {$set: {"updated": true}}) WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 0 }) Of the following ONLY the find() will succeed: use products switched to db products use products db.orders.find() db.orders.insert({a: 1}) db.orders.update({a:1}, {$set: {"updated": true}}) Example output: db.orders.find() db.orders.insert({a: 1}) WriteCommandError({ "ok" : 0, "errmsg" : "not authorized on products to execute command { insert: \"###\", ordered: \"###\", lsid: { id: \"###\" }, $db: \"###\" }", "code" : 13, "codeName" : "Unauthorized" }) db.orders.update({a:1}, {$set: {"updated": true}}) WriteCommandError({ "ok" : 0, "errmsg" : "not authorized on products to execute command { update: \"###\", ordered: \"###\", lsid: { id: \"###\" }, $db: \"###\" }", "code" : 13, "codeName" : "Unauthorized" }) In the last example above, if either or both insert() or update() succeed, this is a finding. Note that this check is by necessity application-specific.
Fix: F-55582r813909_fix
Determine the organization-defined circumstances or situations that require reauthentication and ensure that the mongod and mongos processes are stopped/started (restart), and ensure that the mongod configuration file has security.authentication: true set. In the case of database- and collection-level scoped user privileges, see MongoDB documentation for guidance on application specific configuration for user privileges in order to restrict access as required: https://docs.mongodb.com/v4.4/tutorial/manage-users-and-roles/#create-a-role-to-manage-current-operations https://docs.mongodb.com/v4.4/core/collection-level-access-control/#privileges-and-scope
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-002007
- Version
- MD4X-00-005700
- Vuln IDs
-
- V-252177
- Rule IDs
-
- SV-252177r855518_rule
Checks: C-55633r813911_chk
If MongoDB is configured to authenticate using SASL and LDAP check the saslauthd command line options in the system boot script that starts saslauthd (the location will be dependent on the specific Linux operating system and boot script layout and naming conventions). If the "-t" option is not set for the "saslauthd" process in the system boot script, this is a finding.
Fix: F-55583r813912_fix
With MongoDB configured using SASL LDAP authentication and on certain Linux distributions, saslauthd starts with the caching of authentication credentials enabled. Until restarted or until the cache expires, saslauthd will not contact the LDAP server to re-authenticate users in its authentication cache. This allows saslauthd to successfully authenticate users in its cache, even in the LDAP server is down or if the cached users' credentials are revoked. To set the expiration time (in seconds) for the authentication cache, see the -t option of saslauthd (https://www.systutorials.com/docs/linux/man/8-saslauthd/).
- RMF Control
- SC-23
- Severity
- M
- CCI
- CCI-002470
- Version
- MD4X-00-005800
- Vuln IDs
-
- V-252178
- Rule IDs
-
- SV-252178r855519_rule
Checks: C-55634r813914_chk
To run MongoDB in TLS mode, obtain a valid certificate singed by a single certificate authority. Before starting the MongoDB database in TLS mode, verify that certificate used is issued by a valid DoD certificate authority (openssl x509 -in path_to_certificate_pem_file -text | grep -i issuer). If there is any issuer present in the certificate that is not a DoD approved certificate authority, this is a finding.
Fix: F-55584r817014_fix
Remove any certificate that was not issued by an approved DoD certificate authority. Contact the organization's certificate issuer and request a new certificate that is issued by a valid DoD certificate authority.
- RMF Control
- SC-8
- Severity
- M
- CCI
- CCI-002420
- Version
- MD4X-00-006000
- Vuln IDs
-
- V-252179
- Rule IDs
-
- SV-252179r855520_rule
Checks: C-55635r813917_chk
Review the system information/specification for information indicating a strict requirement for data integrity and confidentiality when data is being prepared to be transmitted. If such information is absent therein, this is not a finding. If such information is present, inspect the MongoDB configuration file (default location: /etc/mongod.conf) for the following entries: net: tls: mode: requireTLS certificateKeyFile: /etc/ssl/mongodb.pem CAFile: /etc/ssl/caToValidateClientCertificates.pem allowInvalidCertificates: false allowConnectionsWithoutCertificates: false FIPSMode: true If net.tls.mode is not set to requireTLS, this is a finding.
Fix: F-55585r813918_fix
Stop the MongoDB instance if it is running. Obtain a certificate from a valid DoD certificate authority to be used for encrypted data transmission. Modify the %MongoDB configuration file% with TLS configuration options such as: net: tls: mode: requireTLS certificateKeyFile: /etc/ssl/mongodb.pem CAFile: /etc/ssl/caToValidateClientCertificates.pem allowInvalidCertificates: false allowConnectionsWithoutCertificates: false FIPSMode: true Set net.tls.mode to the requireTLS. Set net.tls.certificateKeyFile to the full path of the certificate (.pem) file. Start/stop (restart) all mongod or mongos instances using the %MongoDB configuration file% (default location: /etc/mongod.conf).
- RMF Control
- SC-8
- Severity
- M
- CCI
- CCI-002422
- Version
- MD4X-00-006100
- Vuln IDs
-
- V-252180
- Rule IDs
-
- SV-252180r855521_rule
Checks: C-55636r813920_chk
If the data owner does not have a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process, this is not a finding. If such information is present, inspect the MongoDB configuration file (default location: /etc/mongod.conf) for the following entries: net: tls: mode: requireTLS certificateKeyFile: /etc/ssl/mongodb.pem CAFile: /etc/ssl/caToValidateClientCertificates.pem allowInvalidCertificates: false allowConnectionsWithoutCertificates: false FIPSMode: true If net.tls.mode is not set to requireTLS, this is a finding.
Fix: F-55586r813921_fix
Obtain a certificate from a valid DoD certificate authority to be used for encrypted data transmission. Modify the %MongoDB configuration file% with TLS configuration options such as: net: tls: mode: requireTLS certificateKeyFile: /etc/ssl/mongodb.pem CAFile: /etc/ssl/caToValidateClientCertificates.pem allowInvalidCertificates: false allowConnectionsWithoutCertificates: false FIPSMode: true Ensue net.tls.mode is set to requireTLS. Start/stop (restart) all mongod or mongos instances using the %MongoDB configuration file% (default location: /etc/mongod.conf).
- RMF Control
- SI-10
- Severity
- M
- CCI
- CCI-002754
- Version
- MD4X-00-006200
- Vuln IDs
-
- V-252181
- Rule IDs
-
- SV-252181r855523_rule
Checks: C-55637r855522_chk
This is application-specific, but see Schema Validation documentation here: https://docs.mongodb.com/v4.4/core/schema-validation/ As an example, as a user with the dbAdminAnyDatabase role, execute the following on the database of interest: use database db.getCollectionInfos() Where database is the name of the database on which validator rules are to be inspected. This returns an array of documents containing all collections information within the database. For all collections information received, check if the options sub-document contains a validator. If the options sub-document does not contain a validator, this is a finding. Example below shows a finding: [ { "name" : "inventory", "type" : "collection", "options" : { }, "info" : { "readOnly" : false, "uuid" : UUID("b2c86d4d-48bf-4394-9743-620e6d68b87f") }, "idIndex" : { "v" : 2, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "products.inventory" } } ]
Fix: F-55587r813924_fix
Document validation can be added at the time of creation of a new collection. Existing collections can also be modified with document validation rules. Use the validator option to create or update a collection with the desired validation rules. See Schema Validation documentation for details: https://docs.mongodb.com/v4.4/core/schema-validation/
- RMF Control
- SI-2
- Severity
- M
- CCI
- CCI-002617
- Version
- MD4X-00-006300
- Vuln IDs
-
- V-252182
- Rule IDs
-
- SV-252182r855524_rule
Checks: C-55638r813926_chk
Run the following command and observe the output. This command will determine if MongoDB has been installed with a package Manager (RedHat) and display what version is currently installed: rpm -q mongodb-enterprise-server.x86_64 mongodb-enterprise-server-4.4.8-1.el7.x86_64 The output of the command above indicates that MongoDB Enterprise Server has been installed with a package manager. The preceding output is an example showing that MongoDB Enterprise Server Version 4.4.8 is installed. The specific version will be dependent on the actual version installed. Upgrading MongoDB with the same package manager used for installation will overwrite or remove files as part of the upgrade process. If MongoDB was installed with a Package Manager (YUM/RPM for RedHat), this is not a finding. Run the following command and observe the output. rpm -q mongodb-enterprise-server.x86_64 package mongodb-enterprise-server.x86_64 is not installed The output of the command above indicates that MongoDB has not been installed via a package manager or may not have been installed at all. If MongoDB has not been installed with a Package Manager (YUM/RPM for RedHat), this is a finding.
Fix: F-55588r813927_fix
If there is a finding, then MongoDB has not been installed via a package manager and may have been installed manually or not at all. If MongoDB has not been installed via a package manager, verify that an organizational or site-specific document outlining the installation and upgrade procedures for software exists. Review this organizational or site-specific document to determine how and where MongoDB is to be installed on the system. Using this documentation, verify that MongoDB has been installed on the system prior to upgrading. To verify the version of MongoDB Enterprise Server, run the following command in the directory where the MongoDB executable binary has been placed according to the organizational or site-specific documentation. cd %mongod binary directory% ./mongod --version The output will show the version and architecture of the MongoDB Server binary similar to the following: ./mongod --version db version v4.4.8 Build Info: { "version": "4.4.8", "gitVersion": "83b8bb8b6b325d8d8d3dfd2ad9f744bdad7d6ca0", "openSSLVersion": "OpenSSL 1.0.1e-fips 11 Feb 2013", "modules": [ "enterprise" ], "allocator": "tcmalloc", "environment": { "distmod": "rhel70", "distarch": "x86_64", "target_arch": "x86_64" } } Verify that the version desired (what the upgraded version should be) matches what is shown the in output. For example, if updated from MongoDB Enterprise Server v4.4.8 to v4.4.9, the output after the update would be similar to the above but the db version would reflect v4.4.9. If the version is not what is expected, then remove the mongod binary from the system to prevent it from being used and consult the organizational or site-specific documents for further guidance. Run the following commands as an operating system administrator to remove the MongoDB Enterprise Server binary from the system: cd mongod binary directory rm ./mongod
- RMF Control
- SI-2
- Severity
- M
- CCI
- CCI-002605
- Version
- MD4X-00-006400
- Vuln IDs
-
- V-252183
- Rule IDs
-
- SV-252183r855526_rule
Checks: C-55639r855525_chk
Review the organizational or site-specific software update policy and verify that MongoDB has been updated consistent with the time frame specified by the policy. The current major version of MongoDB can be found here: https://docs.mongodb.com/v4.4/release-notes/ This link will show the major version of MongoDB. To find the minor version within that release select the appropriate sublink. For example, to see the latest 4.4 minor releases in MongoDB, select the Release Notes for 4.4. This will show all minor releases and their notes. For example: 4.4.9, 4.4.8, 4.4.6, 4.4.5, etc. If MongoDB has not been updated to the necessary major and minor release in accordance with the policy, this is a finding.
Fix: F-55589r813930_fix
Institute and adhere to the policies and procedures to ensure that MongoDB is updated consistent with the organizational or site-specific software update policy and time frame. Update MongoDB to the necessary major and minor release in accordance with the organizational or site-specific policy.
- RMF Control
- SI-2
- Severity
- H
- CCI
- CCI-002605
- Version
- MD4X-00-006500
- Vuln IDs
-
- V-252184
- Rule IDs
-
- SV-252184r863332_rule
Checks: C-55640r813932_chk
Review the system documentation and interview the database administrator. Identify all database software components. Review the version and release information. To determine the current running MongoDB server version, run the following command from the Mongo Shell: db.version() Access the MongoDB website (https://www.mongodb.com/support-policy/lifecycles) or use other means to verify if the currently running MongoDB server version is still supported. If the DBMS or any of the software components are not supported by MongoDB, this is a finding.
Fix: F-55590r813933_fix
Remove or decommission all unsupported software products. Upgrade unsupported DBMS or unsupported components to a supported version of the product.
- RMF Control
- CM-6
- Severity
- M
- CCI
- CCI-000366
- Version
- MD4X-00-006600
- Vuln IDs
-
- V-252185
- Rule IDs
-
- SV-252185r816999_rule
Checks: C-55641r813935_chk
Assessing the system against the STIG configurations and guidance of the current document is the check for this requirement. If the MongoDB is not configured in accordance with the security configuration settings of this document, this is a finding.
Fix: F-55591r816998_fix
Configure MongoDB in accordance with security configuration settings and guidance of this STIG document to meet the configurations required by the STIG, NSA configuration guidelines, CTOs, DTMs, and IAVMs. It is recommended that MongoDB Enterprise be installed and upgraded though the use of a package manager (YUM/RPM RedHat) where it meets the organizational or site-specific policy: https://docs.mongodb.com/v4.4/tutorial/install-mongodb-enterprise-on-red-hat/