sympy
Warn
Audited by Gen Agent Trust Hub on Oct 8, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The skill provides instructions and examples for using the
picklemodule to load data from files inreferences/code-generation-printing.md. Deserializing untrusted pickle data can lead to arbitrary code execution. - [DYNAMIC_EXECUTION]: The skill demonstrates the use of
autowrapandufuncifyinreferences/code-generation-printing.md, which automatically compile symbolic expressions into C or Fortran code and import them as Python modules at runtime. This involves dynamic code generation and execution through external compilers (Cython, f2py). - [DYNAMIC_EXECUTION]: The skill documents
parse_expr,parse_latex, andparse_mathematicainreferences/code-generation-printing.md. These functions convert strings into executable SymPy objects. The documentation explicitly warns that this can lead to code injection vulnerabilities, but provides it as a core capability. - [INDIRECT_PROMPT_INJECTION]: The skill introduces a significant attack surface for indirect prompt injection by encouraging the parsing of user-supplied strings into symbolic expressions.
- Ingestion points:
parse_exprandparse_latexfunctions (found inreferences/code-generation-printing.md) take raw string inputs. - Boundary markers: Code examples do not demonstrate the use of delimiters or warnings to treat input as data rather than instructions.
- Capability inventory: The skill provides access to
lambdify,autowrap, andpickle, which can execute or compile the resulting expressions. - Sanitization: While a note in
references/code-generation-printing.mdmentions the need for validation and sanitization, no specific implementation or best practices for doing so are provided in the examples.
Audit Metadata