ai-elements

Fail

Audited by Gen Agent Trust Hub on Jul 17, 2026

Risk Level: HIGHCREDENTIALS_UNSAFEEXTERNAL_DOWNLOADSREMOTE_CODE_EXECUTION
Full Analysis
  • [CREDENTIALS_UNSAFE]: The example script scripts/speech-input.tsx uses the environment variable prefix NEXT_PUBLIC_OPENAI_API_KEY. In Next.js, this prefix automatically exposes the variable to the browser, which would leak a user's sensitive OpenAI API key to anyone inspecting the network traffic or client-side source code.
  • [REMOTE_CODE_EXECUTION]: The documentation file references/stack-trace.md includes a backend route example that uses eval(code) to execute logic. Promoting the use of eval() on potentially model-generated code is a high-risk pattern that could allow an attacker to achieve arbitrary code execution on the server through prompt injection.
  • [EXTERNAL_DOWNLOADS]: The skill instructions frequently encourage the use of npx ai-elements@latest, which downloads and executes the latest version of an external CLI tool from the npm registry. While common for development tools, executing remote code automatically at runtime represents a supply-chain risk.
  • [DYNAMIC_EXECUTION]: The JSXPreview component documented in references/jsx-preview.md uses react-jsx-parser to dynamically render JSX strings. If these strings are generated by an AI model without strict sanitization, it could lead to Cross-Site Scripting (XSS) vulnerabilities.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Jul 17, 2026, 03:35 PM
Security Audit — agent-trust-hub — ai-elements