Security context

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

langchain-ai/deepagents
main @ ad4c16a
35
Fixes
0
CVEs
HIGH
Peak severity
26.7%
Coverage
Highlights
Command Injection: 9 prior fixes. Scrutinize any change in this area.
libs/deepagents/deepagents/backends/sandbox.py: most-fixed (4 issues). Treat as high-risk during review.
19 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.

Command Injection: The sandbox backend has suffered multiple high-severity command injection bugs where raw strings were interpolated directly into shell execute blocks. This was mitigated by migrating to base64-encoded JSON payloads over heredocs.
Path Traversal: Unsanitized glob and path patterns processed by filesystem middleware and backends allowed access outside designated workspaces. Canonicalization and strict prefix checks must be consistently applied on all path inputs.
Auth Bypass: Bypasses in command-type authorization checks occurred when the parser only validated the first segment of pipeline commands, allowing chained execution via shell pipes.