langchain

Fail

Audited by Gen Agent Trust Hub on Sep 19, 2026

Risk Level: HIGHDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [DYNAMIC_EXECUTION]: The LangGraph section defines a 'calculator' tool that uses the 'eval()' function on the 'expression' argument. Since this tool is intended to be invoked by an LLM processing natural language, an attacker could craft a prompt that causes the agent to pass malicious Python code (e.g., system commands or file exfiltration) into the evaluator, resulting in full arbitrary code execution.
  • [INDIRECT_PROMPT_INJECTION]: The RAG Pipeline example demonstrates a common architecture for processing external data that lacks necessary security boundaries.
  • Ingestion points: Data is retrieved from a 'vectorstore' via the 'retriever' and fed into the 'context' variable.
  • Boundary markers: The prompt template lacks clear delimiters or 'ignore' instructions for the interpolated context.
  • Capability inventory: The environment includes the dangerous 'eval()' capability (via the calculator tool) and package management capabilities (via pip).
  • Sanitization: The implementation does not include any validation, escaping, or filtering of the retrieved document content before it is processed by the model.
  • [EXTERNAL_DOWNLOADS]: The skill references and installs several standard Python libraries (langchain, langgraph, etc.) from official registries. These downloads are associated with recognized organizations and are documented as standard setup steps.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Sep 19, 2026, 02:52 PM