Security context

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

cyphar/filepath-securejoin
main @ 9e667ca
3
Fixes
0
CVEs
MEDIUM
Peak severity
Highlights
Path Traversal: 2 prior fixes. Scrutinize any change in this area.
procfs_linux.go: most-fixed (2 issues). Treat as high-risk during review.
0 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.

Path Traversal: Older Linux kernels lacking openat2 support rely on fallback path-traversal resolvers that must manually canonicalize paths and enforce strict prefix checks to prevent malicious traversals.
Path Traversal: Incomplete sanitization of the root path supplied to SecureJoin can allow directory traversal exploits when handling unclean paths containing symlinks and parent directory references.
File Descriptor Leak: Global caching of privileged file handles, such as the procfs root file descriptor, can lead to descriptor leaks across container execution boundaries.