CVE-2026-62155 - mongo_fdw connection URI injection through unencoded option values

First Published: 2026/11/25

Last Updated: 2026/11/25

Summary

mongo_fdw builds the mongodb:// connection URI by inserting option values without percent-encoding them, so URI metacharacters (@ : / ? # & =) in a value are parsed as part of the URI structure. A role that is not a superuser but has USAGE on a foreign server can set the username and password options in its own user mapping. An @ or other metacharacter in those values can point the connection at a host the attacker controls, allowing connection redirection, credential capture and man-in-the-middle attacks. Server-level options such as the address, database and replica set can be injected the same way.

Vulnerability details

CVE-ID: CVE-2026-62155

CVSS Base Score: 5.3 Medium

CVSS Temporal Score: Undefined

CVSS Environmental Score: Undefined

CVSS Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Affected products and versions

  • Affected Product: MongoDB Foreign Data Wrapper (mongo_fdw)
  • Affected Versions: mongo_fdw 5.5.3 and earlier, on all supported PostgreSQL and EDB Postgres Advanced Server versions

Remediation/fixes

Impacted users must upgrade to mongo_fdw 5.6.0 or later. From mongo_fdw 5.6.0, mongo_fdw builds the URI with the libmongoc URI API, which encodes credentials, and rejects URI metacharacters in the other option values.

ProductVRMFRemediation/First Fix
mongo_fdw5.5.3 and earlierUpdate to mongo_fdw 5.6.0 or later

Mitigation

Until you can upgrade, reduce exposure as follows:

  • Revoke USAGE on mongo_fdw foreign servers from roles that are not trusted.
  • Review user mappings for usernames or passwords that contain @, :, /, ?, # or & characters.

References

Acknowledgement

Source: Discovered internally by EDB during a security review of mongo_fdw.

Change history

  • 2026/11/25: Original Copy Published

Disclaimer

This document is provided on an "as is" basis and does not imply any kind of guarantee or warranty, including the warranties of merchantability or fitness for a particular use. Your use of the information on the document is at your own risk. EDB reserves the right to change or update this document at any time. Customers are therefore recommended to always view the latest version of this document.


Could this page be better? Report a problem or suggest an addition!