Repository navigation
The MongoDB Ruby team is pleased to announce version 2.26.2 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.26.x series of MongoDB Ruby Driver.
Warning
Ruby Driver versions from 2.0.0 before 2.26.2 are affected by a security issue related to NUL characters in PLAIN authentication credentials changing the identity that the server authenticates (CVE-2026-129929). Users are encouraged to upgrade to the fixed version or mitigate as soon as possible.
Applications that use PLAIN authentication in affected versions can avoid this issue by rejecting any credentials that contains a NUL character (\0, or %00 in a connection string) before passing it to Mongo::Client.
Warning
Node Driver versions from 2.0.3 before 7.9.1 are affected by a security issue where credentials and other values from the connection string can appear in cleartext in error messages and in logged representations of the client (CVE-2026-129930). Users are encouraged to upgrade to the fixed version or mitigate as soon as possible.
Applications on affected versions can reduce their exposure by not writing errors thrown by Mongo::Client to logs.
Install this release using RubyGems via the command line as follows:
gem install -v 2.26.2 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.26.2'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
- Credential exposure via sensitive connection string values included in parse-error messages (RUBY-3950)
- Authentication identity smuggling via NUL-byte injection in SASL PLAIN payload (RUBY-3953)
- Support KMS connect callback for HTTP proxies (RUBY-3813 | PR)
- Take server_connection_id from the command's own connection (RUBY-4015 | PR)
- Fix memory leaks in OTel impl (RUBY-3993 | PR)