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

Published Nov 25, 2026
·
Updated

mysqlfdw accepts several security-sensitive connection options from roles that are not superusers. A role with USAGE on the mysqlfdw foreign data wrapper can set initcommand, 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 mysqldefaultfile, sslkey, sslcert, sslca and sslcapath, which name files read from the PostgreSQL server host, allowing server-side file reads and connection redirection. The issue is fixed in mysqlfdw 2.10.0. From mysqlfdw 2.10.0, only superusers can set initcommand, mysqldefaultfile, sslkey, sslcert, sslca and sslcapath.

Affected Software

0 affected components

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade mysql_fdw to a version that resolves this vulnerability.

    Fixed in 2.10.0

Event History

Nov 25, 2026
CVE Published
via MITRE·04:36 PM
Data Sourced
via MITRE·04:36 PM
DescriptionWeakness

Frequently Asked Questions

1

Which PostgreSQL roles can exploit this issue?

Any non-superuser role with USAGE on the mysql_fdw foreign data wrapper can set the affected connection options. Exploitation does not require that role to be a PostgreSQL superuser.

2

What access or configuration is needed for impact beyond the attacker's own MySQL connection?

A role can use init_command on a shared foreign server, causing arbitrary SQL to run on the remote MySQL server whenever connections are made, including through other users' mappings. The file-related options can cause PostgreSQL server-host files to be read and can redirect connections.

3

Are affected options restricted in the fixed release?

Yes. In mysql_fdw 2.10.0, only superusers can set init_command, mysql_default_file, ssl_key, ssl_cert, ssl_ca, and ssl_capath.

4

How can administrators identify potentially exposed roles and configurations?

Review which non-superuser roles have USAGE on mysql_fdw, then inspect their foreign-server and user-mapping connection options for init_command, mysql_default_file, ssl_key, ssl_cert, ssl_ca, or ssl_capath. Shared foreign servers deserve particular attention because init_command can affect connections using other users' mappings.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203