What changed
An October 9, 2026 WordPress Core developer note confirms that WordPress 7.2 adds NO_BACKSLASH_ESCAPES to wpdb's list of incompatible MySQL/MariaDB SQL modes. Changeset 64240, committed October 8, updates wpdb::set_sql_mode() and its regression test. On connecting, WordPress removes that mode from its own session so backslash-based SQL escaping works as intended. This does not change the server's global mode or connections opened independently by plugins or scripts. WordPress 7.2 Beta 1 is scheduled for October 20 and final release for December 8.
Why it matters
NO_BACKSLASH_ESCAPES makes MySQL treat backslashes literally. WordPress's database layer expects them to escape special characters, so some host configurations can produce wrong data, broken searches or SQL errors only for particular input. This removes a subtle mismatch on the main WordPress connection but cannot fix custom clients, drop-ins or plugins that change session SQL modes. It is a compatibility correction, not a blanket security cure.
Only the WordPress database session changes
WordPress 7.2 will remove NO_BACKSLASH_ESCAPES from @@SESSION.sql_mode when wpdb connects, without changing @@GLOBAL.sql_mode. The change matters for unusual server configurations; standard hosts and standard wpdb usage should usually be unaffected. It is committed in trunk, not yet released as stable.
Custom SQL layers remain responsible for their own escaping
Code opening separate PDO or mysqli connections, implementing db.php drop-ins or setting sql_mode can still encounter incompatible escaping. Independent MySQL 8.0.46 examples demonstrate that escaped apostrophes and LIKE wildcard queries behave differently with the mode enabled. These are compatibility and potential security concerns for badly escaped raw SQL, not proof of a new general WordPress CVE.
Opt-out must run before ordinary plugins
The official developer note documents the incompatible_sql_modes filter for sites that need the mode. It must be added to an early db.php drop-in because normal and must-use plugins load after the connection is established. WordPress warns that retaining the mode may cause core to work incorrectly.
The October 20 beta is the first major migration checkpoint
WordPress 7.2 Beta 1 is scheduled for October 20, Release Candidate 1 for November 17, and final release for December 8, 2026. Test staging configurations and verify the session mode, rather than assuming the server's global SQL settings match the application's connection.