MongoDB Fixes NUL-Byte Authentication Flaw in Node.js Driver

2 min read
Source: MongoDB | Alerts
TL;DR

MongoDB has resolved a security vulnerability in its Node.js driver that allowed attackers to bypass authentication checks by injecting NUL bytes into SASL PLAIN credentials. The fix, included in version 7.9.1, updates credential validation to forbid these characters, closing a gap that could enable identity smuggling.

Key points

  • The vulnerability, tracked as NODE-7828, involved NUL-byte injection in the SASL PLAIN authentication payload, potentially allowing unauthorized access.
  • The fix was released in MongoDB Node.js driver version 7.9.1, with the issue marked as resolved on November 19, 2026.
  • The update includes changes to forbid NUL characters in usernames and passwords, along with synchronized connection string tests and prose tests.
  • The issue was split from a broader driver update ticket (DRIVERS-3599) and linked to a specification pull request for compliance.

Background

This fix follows a similar NUL-byte vulnerability patched in MongoDB's C driver in November 2026, which allowed cursor redirection. It also aligns with broader security efforts in Node.js, such as the October 2026 patch for the 'Node2Shell' remote code execution flaw in the Brotli decoder.

Why it matters

Authentication flaws in database drivers can lead to severe security breaches, allowing attackers to impersonate users or access sensitive data. Prompt patching is critical to prevent exploitation of such vulnerabilities in production environments.

What to watch

Developers should update their MongoDB Node.js driver to version 7.9.1 or later to ensure the NUL-byte injection vulnerability is mitigated. Organizations should also review their authentication configurations to ensure compliance with the updated specifications.

Share this article

Want the full story? Read the original reporting

Read on MongoDB | Alerts