DOMShell misclassified domshell_eval, allowing JavaScript changes without --allow-write

  • npm@apireno/domshell
  • MCP
  • JavaScript
  • domshell_eval
  • CWE-863

The Model Context Protocol tool could change browser state despite being labeled read-only

The advisory lists versions before 2.0.8 as affected and 2.0.8 as patched

Version 2.0.8 addresses the incorrect permission boundary enforcement

The GitHub advisory reports that @apireno/domshell misclassified its domshell_eval tool as read-tier, allowing it to run JavaScript without the server’s --allow-write flag. The same issue affected the eval command in domshell_execute. MCP, or Model Context Protocol, is a system that lets AI applications use external tools.

The advisory says these commands could change a web page’s DOM (its document structure), window or global state. They passed JavaScript expressions to the browser’s CDP Runtime.evaluate function without a check to prevent side effects. The package documentation had described the tool as read-only.

The incorrect classification could cause MCP hosts to show a read-only approval indicator even when an operation could make changes. The advisory also says audit logs labeled write-tier activity as read-tier. It lists versions earlier than 2.0.8 as affected and 2.0.8 as patched.