CVE-2019-2386
High · 7.1CVSS
7.1
EPSS
1.1%
Published
Aug 6, 2019
CISA due date
—
Cloudanix analysis
Deleting a user and later creating a new one with the same name can let someone who was logged in before the deletion keep accessing the system as if they were the new user.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- High
- Impact
- Full Compromise
- Component
- Application
- Class
- Authorization Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Improper invalidation of authorization sessions after user deletion allows an active authenticated session to persist and be conflated with a newly created account that reuses the deleted username, resulting in unauthorized access under the new account's identity.
Why it matters to the business
Organizations face risk of unauthorized data access or actions if deleted user accounts are recreated with the same names, potentially leading to privilege misuse, data exposure, or compliance violations in environments with frequent user account turnover.
How an attack unfolds
An attacker obtains valid credentials or an active session for a user account; after the account is deleted by an administrator, the attacker maintains the session; a new account is then created reusing the exact same username, causing the lingering session to grant the attacker the new account's privileges without re-authentication.
How to fix it
Upgrade MongoDB Server to version 4.0.9 or later, 3.6.13 or later, or 3.4.22 or later; restart nodes after any user deletions to invalidate sessions; avoid reusing usernames of previously deleted accounts.
How to confirm the fix worked
Verify running MongoDB versions against the fixed releases; test by deleting a user, creating a new user with the same name, and confirming that prior sessions no longer grant access; review authorization session handling in logs after user modifications.
Typical attack path
- Obtain valid credentials or hijack an active session for a target user account
- Wait for or trigger deletion of the original user account
- Create a new account using the identical username of the deleted account
- Reuse the persistent session to perform actions under the new account's authorization context
How to detect it
Review MongoDB audit and system logs for sequences of user deletion events followed closely by creation of an account with the identical name; look for authentication or authorization events occurring under a username after its deletion but before a new creation.
What your security team should do
- Immediately upgrade all MongoDB instances to the fixed versions listed for each affected release line
- Implement a policy prohibiting reuse of deleted usernames and enforce it via account provisioning processes
- Schedule periodic restarts of nodes following bulk user deletions as a temporary control
- Monitor for any exploit attempts given the public availability of proof-of-concept code
The record
After user deletion in MongoDB Server the improper invalidation of authorization sessions allows an authenticated user's session to persist and become conflated with new accounts, if those accounts reuse the names of deleted ones. This issue affects MongoDB Server v4.0 versions prior to 4.0.9; MongoDB Server v3.6 versions prior to 3.6.13 and MongoDB Server v3.4 versions prior to 3.4.22. Workaround: After deleting one or more users, restart any nodes which may have had active user authorization sessions. Refrain from creating user accounts with the same name as previously deleted accounts.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:14.04:LTS | mongodb | 0 | No fix |
| Ubuntu:16.04:LTS | mongodb | 0 | No fix |
| Ubuntu:18.04:LTS | mongodb | 0 | 1:3.6.3-0ubuntu1.3 |
| Ubuntu:20.04:LTS | mongodb | 0 | 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.2 |
| Ubuntu:Pro:14.04:LTS | mongodb | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | mongodb | 0 | No fix |
Related vulnerabilities
- CVE-2024-8305 prepareUnique index may cause secondaries to crash due to incorrect enforcement of index… Also affects mongodb
- CVE-2024-7553 Incorrect validation of files loaded from a local untrusted directory may allow local… Also affects mongodb
- CVE-2024-3372 Improper validation of certain metadata input may result in the server not correctly… Also affects mongodb
- CVE-2024-3374 An unauthenticated user can trigger a fatal assertion in the server while generating ftdc… Also affects mongodb
- CVE-2024-1351 Under certain configurations of --tlsCAFile and tls.CAFile, MongoDB Server may skip peer… Also affects mongodb
- CVE-2026-63400 Coop is an open source review and moderation tool from ROOST. CWE-613
- CVE-2026-116251 pgAdmin 4 did not invalidate a user's existing sessions when their password changed… CWE-613
- CVE-2026-119577 ArcadeDB before 26.10.2 contains an improper authorization vulnerability that allows… CWE-613