bun-react-ssr

Warn

Audited by Gen Agent Trust Hub on Sep 15, 2026

Risk Level: MEDIUMDATA_EXFILTRATIONINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTIONDYNAMIC_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [DATA_EXFILTRATION]: Path traversal vulnerability in the server implementation. The code snippet Bun.file(./public${url.pathname}) in src/server.tsx directly uses the request URL path to access local files. This allows an attacker to use directory traversal sequences (such as ../../) to read sensitive files outside of the intended ./public directory.
  • [INDIRECT_PROMPT_INJECTION]: Potential Cross-Site Scripting (XSS) vulnerability through unsafe data hydration.
  • Ingestion points: Data fetched from the SQLite database via db.query("SELECT * FROM users").all() in src/server.tsx and interpolated into the server response.
  • Boundary markers: None present; the data is directly embedded into the HTML structure.
  • Capability inventory: Uses Bun.serve to deliver content and renderToString for SSR.
  • Sanitization: Absent. The data is serialized via JSON.stringify and directly interpolated into a <script> tag (window.__INITIAL_DATA__ = ...), which can be exploited for script injection if the database content is untrusted.
  • [COMMAND_EXECUTION]: Execution of system commands through subprocess spawning. The development script dev.ts uses Bun.spawn(["bun", "run", "src/server.tsx"], ...) to manage the server process during development.
  • [DYNAMIC_EXECUTION]: Runtime bundling and process management. The skill includes examples using Bun.build to compile client-side code and Bun.spawn to handle server execution, both of which involve dynamic code handling.
  • [EXTERNAL_DOWNLOADS]: Standard installation of React dependencies. The quick start instructions use bun add to fetch react and react-dom from official public registries.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 15, 2026, 12:00 AM
Security Audit — agent-trust-hub — bun-react-ssr