Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

oven-sh/bun
main @ 24f6980
898
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Denial of Service: 577 prior fixes. Scrutinize any change in this area.
packages/bun-usockets/src/crypto/openssl.c: most-fixed (13 issues). Treat as high-risk during review.
407 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Arbitrary Code Execution: A bypass in the bundler allowed untrusted macro code to execute at build time even when the --no-macros flag or Bun.build({ macros: false }) option was set. Developers must ensure macro expansion checks are strictly propagated through parse tasks to prevent unauthorized local code execution.
Type Confusion: Unpurified double-precision binary values (float8) from database drivers bypassed JavaScriptCore's NaN-boxing assumptions, allowing malicious database payloads to forge arbitrary JSValues, causing type confusion and potential memory corruption.
Use After Free: User-defined JavaScript callbacks executing during socket write operations or argument coercion can trigger buffer detachment or garbage-collect the underlying handlers, resulting in use-after-free memory access when the native write loop resumes.