The vulnerability exists in the pre-execution validation logic for scripts within the 'exec' tool. The core issue is a "fail-open" design flaw. The system attempted to identify and validate scripts before execution, but the function responsible for parsing the command, extractScriptTargetFromCommand, was intentionally simple. It could not handle complex shell syntax such as pipes, command wrappers (bash -c), or even quoted script paths. When faced with such a command, it would return null. The calling function, validateScriptFileForShellBleed, would interpret this as a command that doesn't involve a script and would therefore skip the security validation. This allowed an attacker to craft a command that would bypass the check and execute a script with potentially malicious content. The patch rectifies this by replacing the simple parser with a more robust one and, more importantly, implementing a "fail-closed" mechanism. The new shouldFailClosedInterpreterPreflight function analyzes commands that the parser can't fully resolve. If it detects a complex command structure that appears to be executing a script, it now throws an error, preventing the execution, rather than silently allowing it to proceed without validation.