Skip to main content
VulnerabilityPublished

Safari MCP: JavaScript injection through single-quoted tool arguments (backslash not escaped)

Affects safari-mcpSource GCVE Database

0

CVSS 6.2 Medium : upgrade to 2.22.15 when convenient.

Data as of 19 Nov 2026, 23:07 UTC

CVSS 4.0 base score
6.2Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 2.22.15
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N

What to do

Upgrade safari-mcp to 2.22.15.

Affected software

ProductAffectedFixed in
npmsafari-mcpAffected
  • <2.22.15
Fixed in
  • 2.22.15

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade safari-mcp to version 2.22.15 or later, where the vulnerability is fixed by proper escaping of backslashes in single-quoted JavaScript strings. There is no configuration workaround; excluding certain tools from the allowlist does not prevent exploitation. Applying the official patch is the only effective mitigation.

Description

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.

References

Community reviews

Loading reviews…