Skip to main content
Background

Akamai Finds Bito Flaw That Exposes 950K Installs to Command Execution

December 03, 2026 by Aviad Gispan

Share

Key takeaways

Unauthenticated local endpoints in Bito’s extension for VS Code and Cursor (versions 1.6.8 and 1.7.0) let attackers execute arbitrary commands on a developer’s workstation.

Malicious webpages, browser extensions, and local scripts can find the extension’s local server within seconds by scanning the ephemeral port range.

Chaining directory discovery, path traversal, and command injection lets attackers steal source code, API keys, SSH private keys, and the developer’s Bito session token; modify files; and run commands under the developer’s user account.

Extension developers should replace unauthenticated local servers with authenticated, tightly scoped interfaces; Bito users should disable the extension until a fix is available.

Introduction

A critical vulnerability chain in the Bito extension for Visual Studio (VS) Code and Cursor allows attackers to execute arbitrary commands on a developer’s workstation by exploiting unauthenticated local server endpoints. Our researchers confirmed the flaws in versions 1.6.8 and 1.7.0, the latest release.

Bito is an AI-powered code review assistant that provides automated code reviews, chat, and context-aware recommendations directly within the editor. The extension has been installed more than 952,000 times from the Visual Studio Marketplace alone (Figure 1).

The extension has been installed more than 952,000 times from the Visual Studio Marketplace alone (Figure 1).
Fig. 1: The Bito AI Code Reviews extension page in the Visual Studio Marketplace showing more than 952,000 installs
The extension has been installed more than 952,000 times from the Visual Studio Marketplace alone (Figure 1).

The exploit chain combines unauthenticated localhost API exposure, path traversal, and command injection to steal session tokens, modify files, and run operating system commands under the developer’s account. Any code that can reach the extension’s local port can trigger the exploit, including malicious browser extensions, compromised package scripts, and webpages granted local network access.

Reaching the local server

On start-up, the Bito extension launches a local HTTP server bound to port 0, so the operating system assigns an available port from its ephemeral range (typically 49152-65535 on macOS and Windows, and 32768-60999 on Linux). This avoids conflicts between editor windows, and the port stays fixed for the rest of the session.

Because the port is unpredictable but drawn from a known range, attackers can find it by scanning. A short script (whether running in a webpage, a browser extension, or a local process) sends parallel requests across the range and probes each port for the extension’s exposed directory endpoint. 

Short timeouts discard unresponsive requests, and closed ports refuse connections almost instantly, so a full scan typically finds an active Bito server within a few seconds (Figure 2).

Short timeouts discard unresponsive requests, and closed ports refuse connections almost instantly, so a full scan typically finds an active Bito server within a few seconds (Figure 2).
Fig. 2: Untrusted code (running in a webpage, a browser extension, or a local process) issuing parallel HTTP requests across the local ephemeral port range to locate an active Bito server
Short timeouts discard unresponsive requests, and closed ports refuse connections almost instantly, so a full scan typically finds an active Bito server within a few seconds (Figure 2).

Chrome now restricts webpages from reaching local addresses such as 127.0.0.1: starting with version 142, its Local Network Access feature prompts the user before a public website can reach services on the device.

Although the prompt reduces the risk, it does not remove it: Developers who work with local APIs may grant access to keep their tools working, and because Chrome saves the permission per site, an attacker exploiting a cross-site scripting flaw on an approved site inherits that access without a new prompt.

Malicious browser extensions avoid the prompt entirely. In our testing on Chrome 156, an extension with no permissions was exempt from Local Network Access checks and could query loopback endpoints silently. Outside the browser, any local process (such as a compromised npm or PyPI package running an install script) can connect to the exposed port with no restriction.

The multistage exploit chain

By chaining four unauthenticated endpoints, attacker-controlled code can progress through three stages:

  1. Reconnaissance 

  2. File theft and tampering

  3. Command execution under the developer’s user account

Reconnaissance

The attack begins with /get-directory, which exposes details about open workspaces. Querying it maps local workspace paths, repository names, and folder structures to reveal high-value targets.

File theft and tampering

Using those paths, the attacker moves to /read-file-common, which is vulnerable to path traversal because it does not sanitize input. Traversal sequences such as ../../../ escape the intended hidden .bito directory to read any file the developer’s account can access, including source code, API keys, and SSH private keys. 

The companion /write-file-common endpoint has the same flaw, letting the attacker overwrite any file the developer’s account can write. Even without the command execution described below, this lets an attacker plant code in shell start-up files or Git hooks, where it runs the next time the developer opens a terminal or commits code. 

The server’s permissive CORS policy (Access-Control-Allow-Origin: *) lets any cross-origin caller (including webpages and browser extensions with no special permissions) read the response bodies directly. Local processes are not subject to CORS at all.

The same flaw exposes Bito’s own configuration file (profile/currentUserProfile.json, renamed profile/profiles.json in version 1.7.0), which contains the developer’s authenticated Bito token, user ID, email address, and organization details. With that token, an attacker can impersonate the developer on Bito’s platform. In our testing, the stolen token remained valid even after the developer signed out and signed back in.

Command execution under the developer’s user account

The final stage is command execution through /execute-code-review-agent, which passes user-supplied commit identifiers to shell commands without sanitization. An attacker sends a POST request with a JSON body that contains a malicious command sequence (such as HEAD && touch ~/Desktop/poc.txt).

From a webpage or a browser extension, a JSON request first triggers a CORS preflight (an OPTIONS request). Bito applies the cors() middleware with its default settings to every route, so it approves each preflight by allowing any origin and returning 204 No Content. The browser then sends the actual POST, and the server executes the injected commands with the developer’s user privileges (Figure 3).

The browser then sends the actual POST, and the server executes the injected commands with the developer’s user privileges (Figure 3).
Fig. 3: The three-stage exploit chain: reconnaissance, file theft and tampering, and command execution
The browser then sends the actual POST, and the server executes the injected commands with the developer’s user privileges (Figure 3).

Remediation strategies

For extension developers

Extension developers should replace implicit trust with explicit controls (Figure 4).

Extension developers should replace implicit trust with explicit controls (Figure 4).
Fig. 4: Comparison of an unauthenticated, implicit-trust local API model and a secure Zero Trust implementation
Extension developers should replace implicit trust with explicit controls (Figure 4).
  • Avoid network listeners where possible: Use the editor’s built-in messaging APIs (such as VS Code’s extension-to-webview messaging) instead of an HTTP server on a TCP port. If a separate process must communicate with the extension, use a Unix domain socket or named pipe restricted to the current user.

  • Enforce authentication on local endpoints: If a local HTTP server is necessary, generate a cryptographically secure token at start-up, share it only through channels attackers cannot query (never an API endpoint or a world-readable file), and reject any request without it.

  • Restrict CORS to known origins: Replace wildcard or reflected CORS policies with an explicit allowlist of the extension’s own origins. Origin headers can be forged by nonbrowser processes, so treat this as defense in depth, not a substitute for authentication.

  • Validate identifiers strictly: Check inputs such as commit hashes and branch names against tight allowlists. For example, commit hashes should match ^[0-9a-f]{7,64}$. Reject any value that begins with a hyphen, so it cannot be read as a command-line option.

  • Canonicalize file paths: Resolve every requested path to its absolute, symlink-resolved form and confirm it stays inside an explicit base directory. This blocks ../ sequences, their encoded variants, and symbolic links that point elsewhere.

  • Use parameterized command execution: Never build shell commands through string concatenation. Use execFile or spawn without a shell, pass user input as separate arguments, and place --end-of-options before user-supplied Git revisions so Git treats them as values rather than options.

 

For end users

Developers and security teams can reduce exposure with the controls illustrated in Figure 5.

Developers and security teams can reduce exposure with the controls illustrated in Figure 5.
Fig. 5: Defense-in-depth measures for developer workstations, from immediate Bito response to extension auditing, browser controls, and process boundaries
Developers and security teams can reduce exposure with the controls illustrated in Figure 5.
  • If you use Bito, act now: Disable or uninstall the extension until a fixed version is available. In our testing, signing out did not invalidate the session token, so contact Bito support to request that existing tokens be revoked. Rotate any credentials stored in workspaces opened while the extension was running (including SSH keys and API keys), then check for tampering by reviewing recently modified files in those workspaces, along with shell start-up files and Git hooks.

  • Audit extensions: Remove unused or unmaintained IDE and browser extensions. To find exposed local services, list listening ports (lsof -iTCP -sTCP:LISTEN on macOS and Linux, netstat -ano on Windows) and investigate any editor or extension processes listening on loopback addresses.

  • Block browser-to-localhost attack vectors: Deploy browser security controls (such as Akamai Workforce Protector [formerly LayerX]) to inspect and govern in-session browser behavior, preventing malicious JavaScript on webpages (including scripts that extensions inject into them) from probing or exfiltrating data through local loopback interfaces (such as 127.0.0.1 or localhost). 

For extensions that connect in the background, Akamai Workforce Protector’s ExtensionPedia flags extensions missing from official stores (such as unpacked builds like the one in our proof of concept) so administrators can block them automatically by policy, and it scores published extensions on risk factors beyond permissions, such as maintenance and reputation.

  • Apply process and network boundaries: Use microsegmentation and endpoint protection tools (such as Akamai Guardicore Segmentation) to monitor process activity and restrict unexpected listening ports opened by editor and extension processes.

 

Disclosure timeline

LayerX (now part of Akamai) followed a standard 90-day coordinated vulnerability disclosure process and extended the window before publishing.

  • June 1, 2026: Contacted Bito support to request a security contact. Bito asked for the full findings through its standard support email.

  • June 9, 2026: Submitted a technical report detailing the localhost API exploit chain, the remote code execution risk, and remediation guidance.

  • June 28, 2026: Followed up on the report’s status and received only an automated acknowledgment. No technical response followed.

  • August 27, 2026: Notified Bito that the 90-day remediation window would close on September 7, 2026, and offered to coordinate before public disclosure. No response was received.

  • December 3, 2026: Published findings, 177 days after the technical report was submitted.

As of publication, Bito has not responded to the report, and no CVE identifier has been assigned.

The localhost fallacy

Localhost is not a security boundary. Webpages, browser extensions, and package install scripts can all reach a local port, and an extension service that accepts unauthenticated requests hands each of them control of the workstation.

Extension developers must treat local APIs with the same Zero Trust scrutiny they apply to public cloud infrastructure, and security teams must treat any unauthenticated local service as exposed.

Frequently asked questions (FAQ)

The Bito extension (versions 1.6.8 and 1.7.0) launches an unauthenticated local HTTP server on an ephemeral port with a permissive CORS policy. Attackers using malicious webpages, zero-permission browser extensions, or compromised local scripts can scan the port range to locate the server and chain four exposed endpoints — using /get-directory for reconnaissance; /read-file-common and /write-file-common for path traversal to steal source code, SSH keys, and session tokens; and /execute-code-review-agent for OS command injection under the developer's account.

Disable or uninstall the Bito extension in VS Code and Cursor immediately until a patched release is available. Because signing out does not invalidate stolen session tokens, contact Bito support to revoke your existing tokens; rotate any API keys or SSH keys stored in open workspaces; and audit your repositories, Git hooks, and shell start-up files for unauthorized modifications.

Avoid binding unauthenticated HTTP servers to TCP ports by using built-in editor messaging APIs or user-restricted Unix domain sockets and named pipes. If a local HTTP server is strictly necessary, enforce cryptographic token authentication, restrict CORS to an explicit origin allowlist, canonicalize file paths to block traversal, and use parameterized execution instead of concatenated shell commands.

Frequently asked questions (FAQ)

About the author

Aviad Gispan

Aviad Gispan

Aviad Gispan is a Senior Researcher with 10+ years in browser security and JavaScript. Builds sandbox tech to detect malicious extensions and harden defenses.