Mysql Foreign Data Wrapper Mysql Fdw
Monthly
SQL injection in mysql_fdw's IMPORT FOREIGN SCHEMA handling lets a malicious, compromised, or man-in-the-middle'd MySQL server execute arbitrary SQL inside the local PostgreSQL session of the user who runs the import. All mysql_fdw versions prior to 2.10.0 are affected: the extension copies remote information_schema metadata into locally executed CREATE FOREIGN TABLE statements without quoting the COLUMN_DEFAULT value or the generated ENUM type name. Reaching the flaw requires the victim to actively run IMPORT FOREIGN SCHEMA against an attacker-reachable server (unauthenticated remote attacker, user interaction required), so exploitation is not self-triggering and does not affect default PostgreSQL installations without the extension; no public exploit code or active exploitation has been identified at time of analysis. EnterpriseDB has released mysql_fdw 2.10.0, which quotes these values, and the issue is prioritized for this week's patch cycle.
SQL injection in mysql_fdw releases prior to 2.10.0 allows an authenticated PostgreSQL user who can create or alter foreign tables or foreign servers, or run IMPORT FOREIGN SCHEMA, to break out of a string literal and execute arbitrary SQL on the remote MySQL server. The unescaped inputs are the dbname and table_name options used by ANALYZE, the remote schema name and the LIMIT TO / EXCEPT table names in IMPORT FOREIGN SCHEMA, and the sql_mode option passed to SET sql_mode; injected statements run with the privileges of the configured MySQL user mapping. Impact stays on the MySQL side - no code execution or file access on the PostgreSQL host - and is bounded by what that mapping is allowed to do; no public exploit has been identified at time of analysis, and the flaw is fixed in mysql_fdw 2.10.0.
In mysql_fdw before 2.10.0, a PostgreSQL role that holds only USAGE on the mysql_fdw foreign data wrapper - not superuser rights - can supply security-sensitive connection options that the extension should have reserved for superusers. Such a role can set init_command, which executes arbitrary SQL against the remote MySQL server on every connection opened through a shared foreign server, including connections made with other users' mappings, and can point mysql_default_file, ssl_key, ssl_cert, ssl_ca and ssl_capath at files on the PostgreSQL server host, enabling server-side file reads and redirection of the connection to a host of the attacker's choosing. The flaw is a privilege-management weakness (CWE-269) rated medium (CVSS 4.0 base 5.8; independently assessed CVSS 3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N), requiring an already-authenticated role with wrapper USAGE; exploitation is not confirmed in the wild and no public exploit has been identified at time of analysis, and mysql_fdw 2.10.0 restricts all six options to superusers.
SQL injection in mysql_fdw before 2.10.0 allows an authenticated PostgreSQL user with SELECT on a foreign table to execute arbitrary SQL on the linked MySQL server under the credentials of the user mapping. The flaw requires the mysql_fdw connection to use a multi-byte character set such as GBK, SJIS, or Big5 while MySQL's default backslash escaping is active; values in pushed-down WHERE-clause literals can then absorb the escape and leave a quote unescaped. Vendor-released patch 2.10.0 fixes this by forcing NO_BACKSLASH_ESCAPES and doubling single quotes; no public exploit identified at time of analysis.
SQL injection in mysql_fdw's IMPORT FOREIGN SCHEMA handling lets a malicious, compromised, or man-in-the-middle'd MySQL server execute arbitrary SQL inside the local PostgreSQL session of the user who runs the import. All mysql_fdw versions prior to 2.10.0 are affected: the extension copies remote information_schema metadata into locally executed CREATE FOREIGN TABLE statements without quoting the COLUMN_DEFAULT value or the generated ENUM type name. Reaching the flaw requires the victim to actively run IMPORT FOREIGN SCHEMA against an attacker-reachable server (unauthenticated remote attacker, user interaction required), so exploitation is not self-triggering and does not affect default PostgreSQL installations without the extension; no public exploit code or active exploitation has been identified at time of analysis. EnterpriseDB has released mysql_fdw 2.10.0, which quotes these values, and the issue is prioritized for this week's patch cycle.
SQL injection in mysql_fdw releases prior to 2.10.0 allows an authenticated PostgreSQL user who can create or alter foreign tables or foreign servers, or run IMPORT FOREIGN SCHEMA, to break out of a string literal and execute arbitrary SQL on the remote MySQL server. The unescaped inputs are the dbname and table_name options used by ANALYZE, the remote schema name and the LIMIT TO / EXCEPT table names in IMPORT FOREIGN SCHEMA, and the sql_mode option passed to SET sql_mode; injected statements run with the privileges of the configured MySQL user mapping. Impact stays on the MySQL side - no code execution or file access on the PostgreSQL host - and is bounded by what that mapping is allowed to do; no public exploit has been identified at time of analysis, and the flaw is fixed in mysql_fdw 2.10.0.
In mysql_fdw before 2.10.0, a PostgreSQL role that holds only USAGE on the mysql_fdw foreign data wrapper - not superuser rights - can supply security-sensitive connection options that the extension should have reserved for superusers. Such a role can set init_command, which executes arbitrary SQL against the remote MySQL server on every connection opened through a shared foreign server, including connections made with other users' mappings, and can point mysql_default_file, ssl_key, ssl_cert, ssl_ca and ssl_capath at files on the PostgreSQL server host, enabling server-side file reads and redirection of the connection to a host of the attacker's choosing. The flaw is a privilege-management weakness (CWE-269) rated medium (CVSS 4.0 base 5.8; independently assessed CVSS 3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N), requiring an already-authenticated role with wrapper USAGE; exploitation is not confirmed in the wild and no public exploit has been identified at time of analysis, and mysql_fdw 2.10.0 restricts all six options to superusers.
SQL injection in mysql_fdw before 2.10.0 allows an authenticated PostgreSQL user with SELECT on a foreign table to execute arbitrary SQL on the linked MySQL server under the credentials of the user mapping. The flaw requires the mysql_fdw connection to use a multi-byte character set such as GBK, SJIS, or Big5 while MySQL's default backslash escaping is active; values in pushed-down WHERE-clause literals can then absorb the escape and leave a quote unescaped. Vendor-released patch 2.10.0 fixes this by forcing NO_BACKSLASH_ESCAPES and doubling single quotes; no public exploit identified at time of analysis.