The mysql_fdw extension for PostgreSQL improperly escapes string literals in queries sent to remote MySQL servers when using multi-byte character sets with MySQL's default backslash escaping. This flaw allows an authenticated user with SELECT privileges on a foreign table to inject arbitrary SQL commands on the remote MySQL server by breaking out of string literals. The vulnerability is fixed in mysql_fdw version 2.10.0, which changes the escaping method and forces NO_BACKSLASH_ESCAPES mode.