A JavaScript injection vulnerability exists in safari-mcp versions prior to 2.22.15 due to improper escaping of backslashes in single-quoted JavaScript string literals in multiple tool arguments. This flaw allows an attacker to inject arbitrary JavaScript code in the page context, including in tabs not owned by the session, even when limited to read-only tools. The issue is fixed in version 2.22.15 by properly escaping backslashes before quotes.