Skip to content

Security Advisory: Prompt Injection Risk via External Data Sources in Chart Generation #279

@joergmichno

Description

@joergmichno

Summary

mcp-server-chart generates charts from data provided to AI assistants. When chart data originates from external sources (APIs, databases, CSV files), attacker-controlled values in data fields, labels, or titles can contain prompt injection payloads that hijack the AI's behavior.

Attack Vector

  1. AI assistant fetches data from an external source (API, database, uploaded CSV) for chart generation
  2. Attacker places prompt injection in data field values, chart titles, axis labels, or annotations
  3. AI processes the data via mcp-server-chart → injected content enters the LLM context
  4. Injection instructs the AI to exfiltrate other data, execute actions via connected tools, or produce misleading visualizations

Impact

  • Data Exfiltration: In multi-tool setups, injection via chart data can trigger actions on other connected MCP tools
  • Misleading Visualizations: Injected instructions could cause the AI to generate charts that misrepresent data
  • Cross-Tool Exploitation: Chart data becomes an entry point for broader agent manipulation

OWASP Classification

  • OWASP LLM Top 10: LLM01 (Prompt Injection)
  • OWASP Agentic Top 10: AG01 (Prompt Injection via Tool Results)

Recommendation

  1. Add a Prompt Injection Warning to the README
  2. Sanitize data values before passing to LLM context
  3. Implement data validation and length limits for text fields

References


Free compliance check: Run your own prompts through our EU AI Act compliance scanner — instant results, no account required: prompttools.co/report

Best,
Joerg Michno
ClawGuard — Open-Source AI Agent Security | 225 patterns, 15 languages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions