-
-
Notifications
You must be signed in to change notification settings - Fork 659
Description
Alarm bells were raised about this in 2022 [1], 2024 [2] and 2025 [3]. The stringifyObjects default is set to false, which makes literally thousands of applications susceptible to SQL Injection.
If the default value had been set to true instead of the current default false, it would have protected all new applications from this vulnerability, which was introduced in node-mysql and later replicated in node-mysql2.
All technical details can be found in [1] and [2]. It is alarming that, although this issue was raised, it has not been fixed since.
[1] https://flattsecurity.medium.com/finding-an-unseen-sql-injection-by-bypassing-escape-functions-in-mysqljs-mysql-90b27f6542b4
[2] #1247 (comment)
[3] https://blog.mantrainfosec.com/blog/18/prepared-statements-prepared-to-be-vulnerable