Browser Extension Message Chains Enable Website-to-OS Code Execution
Vulnerability Disclosure · 3 sources · Updated 3mo ago · First seen Sep 3, 2026

A researcher disclosed a "universal code execution" attack pattern in browser extensions in which a malicious website sends crafted window.postMessage data to a content script that forwards it to a privileged extension background process. Extensions that inject content scripts broadly and fail to validate message origins can expose privileged capabilities to arbitrary websites, including cross-origin cookie access and same-origin policy bypasses.
The impact can escalate to operating-system command execution when the extension relays attacker-controlled data through Chrome native messaging to an unsafe native host. The researcher identified the pattern through extension-manifest analysis and Semgrep taint tracking, and reported two censored, allegedly unpatched cases affecting large user populations; one smart-card extension with roughly two million users reportedly allowed a malicious DLL to be loaded through path traversal in a PKCS#11 library path. Organizations should assess extensions for strict content-script scope, origin and schema validation on message-passing interfaces, and hardened native-message handling.


