Skip to content

F-15: prompt injection via MCP (Info) #1931

Open

Description

@PierrunoYT

Source: CADCraft security & robustness audit (AUDIT.md), revision 477eec5 (v0.10.0), 2026-10-22.
Severity: Info · Confidence: Confirmed.

Summary

MCP prompt-injection exposure:

  • inspect_drawing, query_entities and resources/read cadcraft://drawing return drawing text (MTEXT, layer names, attributes) to the agent unchanged.
  • The same toolset exposes execute (saveas, wblock, lisp, appload) and render with path. A hostile drawing can therefore try to steer an agent into writing files.

Suggested fix

  • Mark drawing-derived strings as untrusted in tool results.
  • Offer a --read-only / --no-fs MCP mode that refuses file-writing commands and LISP.

Related


Filed from the security & robustness audit (rev 477eec5, 2026-10-22).

Activity

  1. ticket-craft commented on Oct 22, 2026

    @ticket-craft

    Thanks! This ticket describes several separate problems:

    • Mark drawing-derived strings as untrusted in MCP tool results
    • Add a read-only or no-filesystem MCP mode refusing file-writing commands and LISP

    It helps a lot if each one has its own ticket, so they can be tracked and fixed separately.

    Possibly related: #1472, #1580 and #1585.

  2. 2ez4gcx commented on Nov 26, 2026

    @2ez4gcx
    Contributor

    Status against main (c9260d1):

    Keep open.

  3. 2ez4gcx commented on Dec 1, 2026

    @2ez4gcx
    Contributor

    Status against main 8bece25 (2026-12-01), updating my comment above. None of the 2026-11-11 input limits touch this issue.

    1. Mark drawing-derived strings as untrusted in tool results: open, nobody on it

    inspect_drawing, query_entities and resources/read cadcraft://drawing still return drawing text as it is. The server's instructions (crates/mcp/src/server.rs:18-21) say nothing about it either. No open PR covers this; #1973's author offered to take it separately.

    2. Read-only / no-filesystem mode: partly done

    Open PRs

    Suggestion: keep this open.

  4. 2ez4gcx commented on Dec 4, 2026

    @2ez4gcx
    Contributor

    @Lion-1209, in #1973 you offered to take item 1 separately (marking drawing-derived strings as untrusted in MCP tool results). I'd like to work on it, unless you have already started; if you have, I'll leave it to you. Your read-only work in #1973 is not affected: this touches only what tools return, not which commands run.

    Approach I have in mind:

    • one line in the server instructions saying that text read from a drawing is data, not instructions;
    • in the results of inspect_drawing, query_entities and resources/read cadcraft://drawing, an added field naming which values come from the drawing, so existing clients that ignore it keep working.

    Per standards/claims.md ("Taking over", point 5), I'll only read and design for now, and open nothing until you answer or 24 hours pass without an answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions