A flaw exists when using recursive JSONPath expressions, such as `$..*`, which return both an array and its nested elements. When size-changing mutators—specifically the functions `JSON.ARRAPPEND()`, `JSON.ARRINSERT()`, `JSON.ARRPOP()`, `JSON.ARRTRIM()`, and `JSON.CLEAR()`—are used, the system processes the ancestor element first. This process can trigger a reallocation of the element buffer and free the old storage while descendant entries in the result set still reference that memory. Consequently, the module writes through these dangling pointers. An authenticated user with permission to execute these commands can cause a server crash or achieve remote code execution with the privileges of the server user.