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})insrc/server.tsxdirectly 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./publicdirectory. - [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()insrc/server.tsxand interpolated into the server response. - Boundary markers: None present; the data is directly embedded into the HTML structure.
- Capability inventory: Uses
Bun.serveto deliver content andrenderToStringfor SSR. - Sanitization: Absent. The data is serialized via
JSON.stringifyand 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.tsusesBun.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.buildto compile client-side code andBun.spawnto handle server execution, both of which involve dynamic code handling. - [EXTERNAL_DOWNLOADS]: Standard installation of React dependencies. The quick start instructions use
bun addto fetchreactandreact-domfrom official public registries.
Audit Metadata