CVE-2026-62152 - mysql_fdw allows non-superusers to set connection options that run SQL and read server files

First Published: 2026/11/25

Last Updated: 2026/11/25

Summary

mysql_fdw accepts several security-sensitive connection options from roles that are not superusers. A role with USAGE on the mysql_fdw foreign data wrapper can set init_command, which runs arbitrary SQL on the remote MySQL server at every connection, including connections made with other users' mappings on a shared foreign server. The same role can set mysql_default_file, ssl_key, ssl_cert, ssl_ca and ssl_capath, which name files read from the PostgreSQL server host, allowing server-side file reads and connection redirection.

Vulnerability details

CVE-ID: CVE-2026-62152

CVSS Base Score: 5.8 Medium

CVSS Temporal Score: Undefined

CVSS Environmental Score: Undefined

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

Affected products and versions

  • Affected Product: MySQL Foreign Data Wrapper (mysql_fdw)
  • Affected Versions: mysql_fdw 2.9.3 and earlier, on all supported PostgreSQL and EDB Postgres Advanced Server versions

Remediation/fixes

Impacted users must upgrade to mysql_fdw 2.10.0 or later. From mysql_fdw 2.10.0, only superusers can set init_command, mysql_default_file, ssl_key, ssl_cert, ssl_ca and ssl_capath.

ProductVRMFRemediation/First Fix
mysql_fdw2.9.3 and earlierUpdate to mysql_fdw 2.10.0 or later

Mitigation

Until you can upgrade, reduce exposure as follows:

  • Revoke USAGE on the mysql_fdw foreign data wrapper from roles that are not trusted.
  • Review existing foreign servers for these options set by roles that are not superusers.

References

Acknowledgement

Source: Discovered internally by EDB during a security review of mysql_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!