# Risk map — elysiajs/elysia

> Canonical page: https://codevetter.com/unpack/elysia/risk-map

# Risk map — elysiajs/elysia

Scanned commit e037eca710e7ad193be09cc6615ab0dbe54af914 (2026-08-26). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The main sensitive boundaries are generated code, cookie signatures, validation output, filesystem reads and WebSocket validation. Native static routing introduces a separate execution boundary that existing guards and regressions explicitly protect. Several implementation differences merit targeted investigation across runtimes and AOT modes. These are source observations or labeled hypotheses, not confirmed vulnerabilities.
- AOT executes generated JavaScript through Function, and compilation failures log generated instructions, hook source and definitions before potentially exiting the process; this is a broad failure and diagnostic boundary. — [src/compose.ts#L2174-2186](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/compose.ts#L2174-L2186) [src/compose.ts#L2220-2266](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/compose.ts#L2220-L2266) [src/compose.ts#L2554-2571](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/compose.ts#L2554-L2571)
- Hypothesis: compilation diagnostics could expose cookie signing material because encodeCookie embeds the configured secret in generated code and the failure logger prints fnLiteral; no failure was induced. (inferred) — [src/compose.ts#L630-651](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/compose.ts#L630-L651) [src/compose.ts#L2223-2228](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/compose.ts#L2223-L2228)
- Cookie verification uses crypto.timingSafeEqual when available but falls back to string equality otherwise; HMAC generation uses Web Crypto SHA-256 and Buffer-based base64 encoding. — [src/utils.ts#L656-716](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/utils.ts#L656-L716)
- file(path) passes the supplied path to Bun.file or Node createReadStream/stat without a root restriction in this constructor; applications exposing request-derived paths must establish their own boundary. — [src/universal/file.ts#L94-104](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/universal/file.ts#L94-L104) [src/universal/file.ts#L145-153](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/universal/file.ts#L145-L153)
- Native promotion bypasses the composed request pipeline; isEmptyPipelineHook rejects substantive hooks/schemas, while start, stop, error and afterResponse are explicitly allowed exceptions. — [src/adapter/bun/handler-native.ts#L7-39](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/adapter/bun/handler-native.ts#L7-L39) [test/core/native-static.test.ts#L83-145](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/test/core/native-static.test.ts#L83-L145)
- Multipart reconstruction has explicit dangerous-key checks in both generated and dynamic nested traversal; duplicated parser implementations make consistent handling of dotted and indexed keys a sensitive edit boundary. — [src/adapter/web-standard/index.ts#L51-59](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/adapter/web-standard/index.ts#L51-L59) [src/adapter/web-standard/index.ts#L90-120](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/adapter/web-standard/index.ts#L90-L120) [src/dynamic-handle.ts#L39-76](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/dynamic-handle.ts#L39-L76)
- Hypothesis: asynchronous Standard Schema WebSocket validators may escape validation because message and response checks read .issues directly from validate(data), whereas HTTP validation awaits Validate; this was not reproduced. (inferred) — [src/adapter/bun/index.ts#L463-468](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/adapter/bun/index.ts#L463-L468) [src/ws/index.ts#L18-29](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/ws/index.ts#L18-L29) [src/dynamic-handle.ts#L189-205](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/dynamic-handle.ts#L189-L205)
- Production Standard Schema validation messages still include found:value; separately, dynamic selected-cookie signing requires schema membership and truthy values, while the AOT selected-cookie branch lacks that membership condition. — [src/error.ts#L360-381](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/error.ts#L360-L381) [src/dynamic-handle.ts#L904-918](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/dynamic-handle.ts#L904-L918) [src/compose.ts#L644-651](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/compose.ts#L644-L651)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
