The vulnerability exists in the $ shell API of the bun package. When a user provides input to the $ tagged template literal, the code attempts to sanitize it by escaping special characters. The process starts in shell.shellCmdFromJS, which is the entry point from JavaScript. This function iterates through the parts of the template literal and passes the dynamic, user-controlled values to shell.handleTemplateValue. For string values, handleTemplateValue calls ShellSrcBuilder.appendJSValueStr, which in turn relies on shell.needsEscapeUtf8AsciiLatin1 to determine if the string needs escaping. The vulnerability lies in the needsEscapeUtf8AsciiLatin1 function, specifically in the SPECIAL_CHARS array it uses for checking. This array is missing the hyphen character (-). As a result, if a user provides a string that starts with a hyphen, it is not identified as needing to be escaped and is concatenated directly into the command string. This allows an attacker to inject arbitrary command-line arguments, leading to OS command injection. The proof of concept demonstrates this by injecting the --upload-pack argument into a git ls-remote command.