Native Messaging Permissions in AI Coding Tools: Risks and Protections
This article explains how native messaging works in Chromium-based browsers and why install-time permission prompts may not reveal later communication. It covers what data an extension and its native host can reach, and it discusses a reported case in which an AI coding tool allegedly used this mechanism to collect location data and send it covertly. No court or authority has confirmed these claims. The article also describes how users can audit their own devices and how organizations can reduce risk. It does not provide steps for bypassing security mechanisms.
Recent reports allege that an AI coding tool used a browser’s native messaging mechanism to obtain users’ locations and send the data back covertly, with the aim of enforcing geographic restrictions. No court or authoritative body has confirmed these claims. This article analyzes only the mechanism and protective measures. It does not provide steps for bypassing security controls.
1. What Is Native Messaging
Chromium-based browsers provide a native messaging interface (nativeMessaging). It allows a browser extension that declares this permission to exchange messages with a native program on the local machine, called a native host. Web scripts cannot call this interface directly. Communication must go through an extension.
A native host registers a host manifest file on the system. The manifest specifies the host name, the path to the executable, and the extension IDs allowed to connect. On Windows, a registry key points to this manifest. On macOS and Linux, the browser looks for the manifest in the NativeMessagingHosts directory.
2. Install-Time Prompts Versus Runtime Authorization
Many users assume that every communication triggers a confirmation dialog. This is not accurate. When an extension declares the nativeMessaging permission, the browser shows a permission prompt at installation or update. The installer usually writes the manifest file. Writing the manifest does not prompt the user again each time the two programs communicate.
As a result, whether users notice anything unusual depends mainly on two factors: whether they saw the permission prompt during installation, and whether they check their system periodically afterward. The dispute in the reports centers on whether the installer wrote the registration information without the user’s knowledge. Specific evidence is still needed to settle this point.
3. Data Exposure After Permissions Are Granted
The data that can be accessed depends on the extension’s permission declarations and the capabilities of the native host, so no single answer applies to every tool. Three categories help frame the risk.
First, the extension itself. An extension can access only what its declared permissions cover, such as page data for specific sites, cookies, or tab information. These permissions are usually listed at installation.
Second, the native host. The host program runs under the current system account and can read and write any files that account can access. It can also call system services. The operating system’s permission model constrains the host, but under a user account those constraints are often loose.
Third, geolocation data. A web page or extension needs the user’s permission to get the browser’s location. A native host can read location services that the operating system already provides. These services usually display their own system-level authorization prompt.
The highest risk involves login credentials. If a session token stored in cookies or local storage leaks, someone else may be able to log in to the related websites as the user. This is the data category that deserves the most attention.
4. The Covert Transmission Claim
The reports state that the tool may have mixed location information into telemetry or log fields and uploaded it along with them. If this happened, the data would typically not appear as obvious plaintext fields and would be sent together with normal telemetry.
However, a field that looks like a log entry does not prove steganography by itself. Assess several factors together: whether the destination domains match the product’s functions, whether the reporting frequency is unusual, whether the field contents match business needs, and whether encoded data unrelated to the product’s function is present. Only when these pieces of evidence support one another can a reliable conclusion be drawn.
5. How to Check Your Own Device
The following steps are for auditing only. They do not change system configuration. Back up related files before you begin.
- Open the extension management page in Chrome or Edge. Review each extension’s permissions and site access settings. Note any extension that declares the nativeMessaging permission.
- Check the native host manifests. On Windows, check the registry key
HKCU\Software\Google\Chrome\NativeMessagingHosts. For Edge, checkHKCU\Software\Microsoft\Edge\NativeMessagingHosts. On macOS, check the directory~/Library/Application Support/Google/Chrome/NativeMessagingHosts/. On Linux, check the directory~/.config/google-chrome/NativeMessagingHosts/. Confirm that the program paths and extension IDs in each manifest match software you have installed. - For entries you cannot identify, record their paths and contents and back up the files first. Then contact the software source or a security professional. Do not delete unfamiliar files, because doing so may break other legitimate software.
- Remove unneeded extensions from the extension management page. This is safer than editing the registry or directories by hand.
6. Protective Measures for Organizations
Organizations can act in several areas.
First, build a software allowlist that prevents employees from installing unreviewed AI development tools.
Second, use browser management policies to restrict extensions and native hosts. Chrome provides policies such as NativeMessagingAllowlist and NativeMessagingBlocklist, which centrally control which native hosts may or may not connect.
Third, log outbound domains at the gateway and DNS layers. Periodically compare proxy logs with known telemetry domains. When a reporting destination unrelated to business needs appears, investigate it promptly.
Fourth, sign data processing agreements with vendors. Require them to state in writing the purpose of each permission, the categories of data involved, and the retention period.
7. Recommendations for Browser Vendors and Developers
Browser vendors can show clearer warnings about native messaging during installation. They can also let administrators view and revoke related registrations centrally.
Developers who need local capabilities should keep permission scopes as narrow as possible, explain each permission’s purpose in the user interface, and state in the privacy policy where the data goes.
Conclusion
This incident shows that the gap between declared permissions and actual behavior needs verifiable evidence. For users, the lowest-cost protection is to check extensions and local registrations regularly, and to avoid granting a tool more permissions than its functions require. For developers, explaining clearly how each permission is used is what earns lasting trust.
