Security context

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

vitejs/vite-plugin-react
main @ 640fd35
2
Fixes
2
CVEs
CRITICAL
Peak severity
50.0%
Coverage
Highlights
Path Traversal: 2 prior fixes. Scrutinize any change in this area.
packages/plugin-rsc/src/plugin.ts: most-fixed (1 issue). Treat as high-risk during review.
2 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: Insufficent path validation on the filename query parameter in the `/__vite_rsc_findSourceMapURL` development endpoint allowed arbitrary file reads. Future development must guarantee that all development-only endpoints strictly validate input paths using robust helper checks before invoking file-system reads.
Path Traversal: An attacker with network access could trigger remote code execution by providing arbitrary server/client reference IDs which were resolved through unsafe dynamic imports. Any dynamic import statement within development plugins must canonicalize paths and enforce strict prefix allowlists.