From c0806fabe8c852476f0e6f762a6accc63dee2aa0 Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Wed, 18 Feb 2026 12:51:41 +0530 Subject: [PATCH] Revert "fix(safe-exec): Allow WITH queries" (#37175) --- frappe/utils/safe_exec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/safe_exec.py b/frappe/utils/safe_exec.py index 064d9c9486..1b10fc30f1 100644 --- a/frappe/utils/safe_exec.py +++ b/frappe/utils/safe_exec.py @@ -484,7 +484,7 @@ def check_safe_sql_query(query: str, throw: bool = True) -> bool: """ query = query.strip().lower() - whitelisted_statements = ("select", "explain", "with") + whitelisted_statements = ("select", "explain") if query.startswith(whitelisted_statements): return True