Security context

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

daytonaio/daytona
main @ ec4c21b
69
Fixes
6
CVEs
HIGH
Peak severity
Highlights
Auth Bypass: 31 prior fixes. Scrutinize any change in this area.
apps/api/src/sandbox/services/sandbox.service.ts: most-fixed (5 issues). Treat as high-risk during review.
32 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.

Auth Bypass: The proxy handles sensitive preview URL signing and routing. Insufficient cookie binding, lack of PKCE in auth callbacks, and incorrect credential propagation have historically allowed unauthorized sandbox access. Developers must strictly enforce token validation and bind secure cookies to the correct token structures.
Path Traversal: Volumes and S3 subpaths can be manipulated to achieve directory traversal and unauthorized host directory mounting. Canonicalization and validation of volume IDs/paths must happen prior to orchestrating actions on sandbox runners.
Auth Bypass: Context type-guards (e.g., isProxyContext, isSshGatewayContext, isRunnerContext) are prone to logic errors where they fallback to or match administrative roles, elevating service-to-service credentials to global admin privileges.