diff --git a/apps/x/packages/core/src/application/lib/command-executor.ts b/apps/x/packages/core/src/application/lib/command-executor.ts index e865e98d..d16806b4 100644 --- a/apps/x/packages/core/src/application/lib/command-executor.ts +++ b/apps/x/packages/core/src/application/lib/command-executor.ts @@ -3,7 +3,7 @@ import { promisify } from 'util'; import { getSecurityAllowList } from '../../config/security.js'; const execPromise = promisify(exec); -const COMMAND_SPLIT_REGEX = /(?:\|\||&&|;|\||\n)/; +const COMMAND_SPLIT_REGEX = /(?:\|\||&&|;|\||\n|`|\$\(|\))/; const ENV_ASSIGNMENT_REGEX = /^[A-Za-z_][A-Za-z0-9_]*=.*/; const WRAPPER_COMMANDS = new Set(['sudo', 'env', 'time', 'command']);