text-to-cad
- Type
- MCP server
- Scanned
- Nov 21, 2026
- Version
- 048f763bbbed
- Files read
- 2671
text-to-cad is a plugin and local viewer that lets AI coding assistants build, check, and display 3D models, circuit boards, engineering drawings, and robot simulations on your computer. The biggest risk is that its background service runs outside the AI assistant's safety sandbox and silently updates itself by default, meaning a tricked assistant or an untrusted project or design file could run code with full access to your machine, read private files, or leak Windows login details.
What it can reach
- Files
- Reads and writes 3D models, circuit board designs, drawings, robot files, slicer presets, snapshots, and Python scripts across your disk, browses local folders for the viewer, stores local cache and state data, and edits configuration files for installed AI coding assistants.
- Shell commands
- Runs AI-written Python scripts and local commands through background workers, installs Python environments and packages, and launches external engineering, rendering, and simulation tools such as KiCad, Blender, CalculiX, OrcaSlicer, and MuJoCo Studio.
- Network
- Runs a local web server for the viewer, can start a MuJoCo simulation server open to your local network without a password, downloads packages, plugins, and automatic updates from PyPI, GitHub, and texttocad.dev, fetches SendCutSend specs, and sends usage stats and crash reports to api.texttocad.dev by default.
- Browser
- Opens interactive 2D and 3D model and circuit board viewer pages in your default web browser or inside supported AI assistant apps.
- System
- Installs plugins into detected AI coding apps, opens desktop CAD or 3D-printing apps and system file dialogs, copies text and screenshots to your clipboard, and inspects running processes, system fonts, the Windows Registry, and macOS Spotlight metadata to detect installed software.
Findings
-
HighUnsandboxed background daemon lets sandboxed agent commands bypass OS network and filesystem restrictions
packages/cad/src/cad_server/engine/daemon.py:1579
When launched via cad mcp (enabled by default in Codex) or cad server start, the engine daemon runs outside the AI agent's turn sandbox and opens a named-pipe door specifically designed so sandboxed shells with no socket or network access can reach it. Over this door, the daemon accepts build requests (which execute Python scripts and even caller-specified interpreter.executable binaries and environment variables in unsandboxed worker processes) as well as base requests (which run uv pip install with caller-supplied URLs, editable paths, and package indexes on the host). If an AI agent is tricked by prompt injection while confined to a workspace-only, no-network sandbox, it can ask the daemon to run a script or binary on its behalf, escaping the OS sandbox to exfiltrate credentials over the internet or modify files anywhere in the user's home directory without user approval.
Fix: Do not execute arbitrary user scripts, caller-supplied interpreter.executable binaries, or arbitrary uv package/index specifications inside an unsandboxed host daemon on behalf of sandboxed clients; run untrusted builds inside the caller's sandbox or require explicit host-level user confirmation.
-
HighRunning built-in integration tools via cad run executes untrusted pyproject.toml and uv.toml in the working directory
packages/cad/src/cad_server/cli/run.py:323
Documentation and registry help instruct users and agents to run commands such as cad run mujoco-studio --model scene.xml or cad run kicad-cli to view robot scenes or check circuit boards. In prepare(), local project discovery is only skipped when a Python script contains an inline PEP 723 script block. When running a non-script command (plan.kind == 'command'), cad run automatically walks up from the current directory to load any pyproject.toml, uv.lock, and uv.toml. If a user or agent runs cad run mujoco-studio or cad run kicad-cli inside a downloaded project folder containing a malicious pyproject.toml (with a build-system) or uv.toml (pointing to an attacker-controlled package index), the unsandboxed daemon builds the local package or installs from the attacker's index, executing arbitrary code while the user only intended to inspect a data file.
Fix: When plan.kind == 'command' and for_command(plan.target) names a declared integration tool (such as kicad-cli, mujoco-studio, or ccx), default to --no-project and ignore local pyproject.toml, uv.lock, and uv.toml files unless explicitly requested.
-
HighKiCad schematic child-sheet paths allow path traversal and Windows UNC credential leaks
packages/cad/src/cad/engine/formats/kicad/schematic.py:699
When opening, inspecting, or rendering a KiCad schematic (.kicad_sch), _Reader.walk joins each child sheet's Sheetfile property with file.parent and calls .resolve(), .is_file(), and .read_text() without checking that the path stays inside the project directory or blocking network shares. On Windows, a Sheetfile value such as //attacker.example.com/share/sub.kicad_sch overrides file.parent and causes Windows to connect to the remote SMB or WebDAV server, leaking the user's NetNTLMv2 login credentials and fetching remote content (a risk SECURITY.md explicitly guards against in models3d.py, but not here). On all platforms, relative traversal (../), absolute paths, or symlinks let a stranger's schematic embed and display other .kicad_sch files from anywhere on the user's machine, probe arbitrary file existence via warnings, or read arbitrary files into memory.
Fix: Apply the same text-first path checks used in models3d.py before any filesystem call: reject UNC shares, device paths, drive-relative paths, and absolute paths; verify that os.path.realpath of the child file stays inside os.path.realpath of the root schematic's directory; require a .kicad_sch suffix; and enforce a maximum file size before reading.
-
MediumMigration bridge downloads and executes unpinned remote installer in the background
packages/cad/src/cad_server/cli/setup.py:268
During background server maintenance (
Tending.tend->once()) and incad setup, the server runsinstall_script.installer(), which downloads and executes the live install script from texttocad.dev. Even if a user installedcadmanually withuv tool install cadto avoid running a remote script, any leftover receipt or plugin folder from an older text-to-cad version causes the daemon to silently turn onplugin.auto_updateand run the remote installer across all detected agent apps on the computer.Fix: Avoid fetching and executing remote installer scripts from a background daemon, and require explicit user confirmation before enabling plugin auto-updates or modifying agent app configurations.
-
MediumSilent background self-updates and runtime MCP tool installation are enabled by default and override version pins
packages/cad/src/cad_server/_internal/auto_update.py:478
By default (switches() returns on=True when unset), the daemon polls https://api.texttocad.dev/v1/releases hourly and spawns a detached helper to upgrade global uv or pipx installations to the newest 0.x release on PyPI and restart the server (and, when plugin.auto_update is enabled, re-run cad plugin install across installed agent apps). Even if a user manually installs an exact pinned version (uv tool install cad==0.11.14) or runs a version-pinned MCP configuration (uvx cad@0.11.14 mcp), cad_mcp/shim.py installs an unpinned cad<1 globally on first launch and auto_update.py overwrites the uv receipt pin. A supply-chain compromise of a new 0.x release on PyPI will be automatically pulled and executed on existing machines without user interaction.
Fix: Make automatic background updates opt-in rather than default-on, preserve explicit version pins in uv-receipt.toml, and have cad_mcp/shim.py execute the exact version requested by the MCP config instead of installing an unpinned global package at runtime.
-
MediumPath traversal and local file read via external URIs in Blender GLB loader
packages/cad/src/cad/blender/_scene.py:294
When cad.blender.load imports a GLB file into Blender for rendering, _beside rewrites any relative or leading-slash URI in the GLB JSON's buffers or images arrays into a resolved absolute path on disk without checking that it stays inside the GLB's folder. Unlike the STEP and URDF readers, which block external file references and parent-directory traversal, a crafted GLB file handed to a render workflow can reference private images or files elsewhere on the user's computer and render those images onto 3D surfaces in the output picture.
Fix: Reject external buffer and image URIs in binary GLB files, or reject absolute paths and verify with Path.is_relative_to that the resolved file stays inside the GLB's parent directory without crossing symlinks.
-
MediumPermanent viewer URL token accepted cross-origin from any website with Private Network Access
packages/cad/src/cad_server/viewer/engine_app.py:410
The local viewer URLs printed in terminal build output and returned in headless MCP tool messages carry a signed ?token= link set to expire in the year 3000, staying identical across restarts and ports until manually rotated. EngineApp also answers unauthenticated OPTIONS preflights with Access-Control-Allow-Private-Network: true and echoes any Origin header in Access-Control-Allow-Origin whenever that link token is sent as a Bearer header. If a user ever pastes a 127.0.0.1 view URL into a bug report or chat log, or an agent leaks it via prompt injection, any website the user visits in their browser can reach loopback to list local folders, read CAD and PCB files, and open files in desktop apps.
Fix: Disable cross-origin CORS and Private Network Access headers unless the CAD_MCP_PRESENTATION=inline development mode is explicitly active, use short-lived single-session tokens for MCP card fallback, and give printed ?token= links a short expiration.
-
MediumUnbounded bus range and sub-sheet expansion in KiCad schematic parser can crash the CAD server
packages/cad/src/cad/engine/formats/kicad/schematic.py:152
When parsing a KiCad schematic, bus vector labels such as D[0..999999999] are expanded across the entire numeric range in memory with no upper limit. In addition, hierarchical sub-sheet walking only checks whether a child file is already on the current recursion chain (child in seen) rather than bounding total sheet instances, allowing a small acyclic hierarchy of sub-sheets to expand exponentially, and cyclic symbol extends declarations trigger an unhandled RecursionError. Opening a tiny crafted .kicad_sch file can exhaust memory and crash or freeze the shared local CAD server.
Fix: Enforce a reasonable cap on the number of members expanded per bus label, cap the total number of sheet instances visited across a schematic hierarchy, and track visited symbol names when resolving extends in _lib_symbol.
-
MediumUnbounded zone hatching and geometry subdivision in KiCad board plotter can exhaust memory and CPU
packages/cad/src/cad/engine/formats/kicad/plot.py:404
When plotting a KiCad board (.kicad_pcb), _hatch divides the zone outline span by the zone's hatch pitch without enforcing a minimum spacing or a maximum line count, so a tiny zone with a microscopic pitch such as (hatch full 1e-9) runs billions of loop iterations and exhausts memory. Similar missing bounds in geometry.py (chords allocates tens of millions of points or raises ZeroDivisionError when huge circle radii round 1 - tolerance / radius to 1.0) and connectivity.py (_candidate_pairs iterates over every 2 mm grid cell across a track's bounding box) let a small crafted board file hang or crash the local CAD server.
Fix: Enforce board coordinate bounds, clamp minimum hatch spacing and maximum hatch lines in _hatch, cap maximum chord subdivisions (and guard against zero angle steps) in chords, and bound grid cell expansion in connectivity.
-
MediumSkill instructions advise running cad scripts outside the agent sandbox when network access is needed
skills/cad/references/environments.md:26
The CAD environment reference tells the agent to run cad run outside a sandbox (or request permission to bypass it) whenever uv needs network access to install Python packages. Because cad run both installs packages (from inline script headers, --with arguments, or a folder's pyproject.toml including custom private indexes) and immediately executes the target Python script, running it unsandboxed removes filesystem and network containment for untrusted CAD scripts or repositories.
Fix: Separate environment provisioning from script execution so dependencies can be fetched without running the model script unsandboxed, and warn the agent not to bypass the sandbox for untrusted scripts or custom pyproject.toml package indexes.
-
LowRobot simulation skill starts unauthenticated MuJoCo Studio server on 0.0.0.0
skills/robot-simulation/SKILL.md:458
When the agent creates, changes, or shows an MJCF robot file, the skill's 'Show the model' instructions tell it to run
cad run mujoco-studio --model FILEautomatically. As noted earlier in the skill text, MuJoCo Studio listens on every network interface (0.0.0.0) with no password or authentication, exposing the simulation web viewer to anyone on the same Wi-Fi or local network without asking the user first.Fix: Bind MuJoCo Studio to 127.0.0.1 by default if supported, or require the agent to ask the user before starting a server exposed on all network interfaces.
-
LowInstaller scripts download and execute unpinned bootstrap code without checksums
scripts/install/install.sh:226
The quickstart installer downloads
uv-install.shfrom astral.sh andinstall.pyfrom texttocad.dev and executes both without version pins or SHA-256 integrity checks, then installs the latest unpinnedcadpackage from PyPI and enables automatic updates.Fix: Pin specific versions and verify SHA-256 checksums before executing downloaded installer scripts.
-
LowSkills instruct the agent to install unpinned cad package with --force
All eight skill files tell the agent to run
uv tool install cadwithout pinning the release version the skill was reviewed with, and to add--forceifcadalready exists. Installing from a reviewed plugin directory can therefore pull newer unreviewed PyPI releases (with background auto-updates enabled by default) and overwrite an existingcadcommand.Fix: Pin
uv tool install cad==0.11.14to match the reviewed plugin release and ask the user before passing--force. -
LowBackground migration runner and quickstart pipe unpinned remote scripts directly to a shell
packages/cad/src/cad_server/_internal/install_script.py:63
install_script.py defines a background Carrier runner (invoked by Daemon.tend when handover.json is marked owed during upgrades from versions 0.10.0 through 0.11.11, and mirrored in README.md's quickstart instructions) that downloads https://texttocad.dev/install.sh and pipes it straight into sh, or pipes https://www.texttocad.dev/install.ps1 into PowerShell with -ExecutionPolicy Bypass, with no cryptographic hash, signature check, or version pin. If texttocad.dev or its CDN/DNS is compromised, any installation performing this handover (retrying up to 30 times over 30 days) or any user running the quickstart command will execute arbitrary remote commands.
Fix: Remove remote curl-pipe-sh and irm-pipe-iex execution from the Python server package in favor of direct uv tool commands, and publish version-pinned, checksum-verified installation instructions.
-
LowUsage telemetry, crash reports, and hourly release checks phone home by default on an opt-out basis
packages/cad/src/cad_server/analytics.py:846
After the first interactive CLI command prints a one-line notice to stderr without prompting for consent, analytics.py records notifiedAt in settings.json and begins sending periodic batches of usage metrics (tool calls, UI controls used, file format counts, OS/architecture, detected agent app) and sanitized crash stack traces to https://api.texttocad.dev/v1/events. Separately, updates.py queries https://api.texttocad.dev/v1/releases every hour while the daemon runs. Although user file paths, filenames, and prompts are stripped and README.md discloses this behavior, network telemetry is active without explicit opt-in.
Fix: Require explicit opt-in before enabling telemetry transmission and document CAD_TELEMETRY=0, DO_NOT_TRACK=1, and CAD_UPDATE_CHECK=0 directly in the quickstart section.
-
LowPlugin installer pulls from mutable Git branches and bypasses CLI trust prompts
packages/cad/src/cad_server/plugin/apps.py:641
When cad plugin install runs during setup or background updates, it installs plugins and skills into up to 24 detected AI coding agents from mutable GitHub branches rather than a pinned release tag or commit hash. Most agents pull from the latest branch while Factory Droid, Devin CLI, and Antigravity pull directly from the active main development branch, and the installer passes flags such as --trust, --consent, -y, and approve to bypass interactive trust prompts.
Fix: Pin plugin and skill downloads to the exact release tag (v<version>) or commit hash matching the installed cad package rather than mutable latest or main branches, and allow users to choose which agent apps are modified.
-
LowMuJoCo Studio web viewer listens on all network interfaces without authentication
packages/cad/src/cad/mujoco/_command.py:31
When a user or AI agent runs cad run mujoco-studio to view a robot simulation, this wrapper automatically passes --gfx=web by default. As the module notes, MuJoCo Studio's web viewer binds to :: (every IPv4 and IPv6 network interface) with no password or authentication. Although a warning is printed to stderr at launch, an agent running the command may not surface that warning before the port is open, allowing anyone on the same Wi-Fi or local network to view and interact with the simulation.
Fix: Require an explicit flag before enabling --gfx=web, or wrap the mujoco-studio Python entrypoint so socket binds are restricted to loopback (127.0.0.1 / ::1).
-
LowSymlink resolution runs before ownership checks on fallback /tmp engine directory
packages/cad/src/cad/engine/places.py:281
On POSIX systems where neither XDG_RUNTIME_DIR nor a private TMPDIR is set (such as containers or SSH sessions without systemd), default_engine_dir() falls back to /tmp/cad-<uid>. While folder_refusal() uses os.lstat() to reject symlinks and directories owned by other users, engine_dir() calls os.path.realpath() first in Python userspace, bypassing Linux's kernel symlink protection. On a multi-user machine, another local user can pre-create /tmp/cad-<uid> as a symlink to any directory owned by the victim (or a victim-owned folder inside a shared writable directory), causing folder_refusal() to inspect the target instead of the symlink and letting engine lock and pipe files be placed there.
Fix: Inspect the unresolved default_engine_dir() path with os.lstat() (and verify parent directory permissions) before calling os.path.realpath().
-
LowPredictable temporary filename used in shared /tmp directory during STEP import
packages/cad/src/cad/engine/serve.py:1479
When a page opens a STEP file, the server creates a progress file directly inside tempfile.gettempdir() (/tmp on Linux when TMPDIR is unset) with a predictable name derived from the file hash and process ID, and the reader process writes to <path>.tmp with standard open(..., 'w'). On shared machines, this exposes file hash prefixes and part counts to other local users and relies on OS-level symlink protection to prevent local symlink overwrite races.
Fix: Place the temporary progress file inside a private mode-0700 directory such as tempfile.TemporaryDirectory() or places.make_engine_dir().
-
LowURDF mesh loader resolves arbitrary local paths and parent traversal
packages/cad/src/cad/engine/urdf_source.py:57
Unlike package:// mesh URIs and KiCad 3D model paths, which enforce folder boundaries, mesh_file() resolves non-package URDF <mesh filename> attributes using file:// URIs, absolute paths, or .. traversal to any location on the disk. Opening or snapshotting an untrusted .urdf file from an external repository or attachment can pull in and render unrelated .stl, .3mf, or .glb models from elsewhere on the user's computer.
Fix: Constrain local URDF mesh paths to stay within the URDF file's directory or package root unless additional directories are explicitly allowed.
-
LowUnbounded zip decompression when reading printer settings from a 3MF file
packages/cad/src/cad/_internal/dfm/printing.py:566
When running a 3D-printing manufacturing check with
--printerpointing to a slicer-saved.3mffile,_printer_filereadsMetadata/project_settings.configinto memory witharchive.read()during option validation before starting a memory-limited worker process. Unlike the main 3MF geometry reader (threemf.py), which enforces strict uncompressed size and compression-ratio caps, an untrusted.3mfarchive containing a zip-bomb settings entry could exhaust memory if an agent passes it to--printer.Fix: Read
Metadata/project_settings.configviaarchive.open()with a bounded byte limit (for example a few megabytes) rather than callingarchive.read()unbounded. -
LowUntrusted regular expressions in KiCad project files can cause catastrophic backtracking
packages/cad/src/cad/engine/formats/kicad/naming.py:58
When reading a KiCad board, the parser loads netclass_patterns from any .kicad_pro project file next to it and passes each pattern directly to Python's backtracking re.fullmatch against every net name on the board. A downloaded KiCad project folder with a pathological pattern such as (a+)+$ and a non-matching net name can stall the Python process at 100% CPU.
Fix: Bound pattern and net name lengths and either use a linear-time regular expression engine or restrict netclass_patterns to safe glob/wildcard matching.
-
LowRobot simulation skill instructs the agent to start an unauthenticated web server on all network interfaces
skills/robot-simulation/references/mujoco-environment.md:536
The robot-simulation skill workflows (in mujoco-environment.md, mjcf-authoring.md, and from-a-vendor-step.md) tell the AI agent to run 'cad run mujoco-studio --model ...' to show MJCF scenes without first asking the user for permission. Because MuJoCo Studio binds to every network interface (0.0.0.0) with no authentication, running it while connected to public Wi-Fi or a shared LAN exposes the web viewer to anyone on the network.
Fix: Require explicit user confirmation in the skill instructions before running mujoco-studio, add the network exposure warning to mjcf-authoring.md and from-a-vendor-step.md, and bind or proxy MuJoCo Studio to 127.0.0.1 if possible.
-
InfoAnonymous usage telemetry and crash reports enabled by default
packages/cad/src/cad_server/viewer/engine_app.py:240
The engine starts telemetry recorders for both the MCP CAD app and the browser viewer by default, sending aggregated usage counts and sanitized crash stack traces to api.texttocad.dev. This behavior and how to turn it off (via the app menu or cad telemetry off, which also requests server-side deletion) are documented in the README and privacy policy.
Fix: Users who do not want usage statistics or crash reports sent can run cad telemetry off or set DO_NOT_TRACK=1.
