Something went wrong. Try again.
Fork of backnotprop/plannotator with reduced surface area
Something went wrong. Try again.
fix(server): prevent arbitrary file read via /api/image endpoint (#164)
The /api/image endpoint serves files from the local filesystem based on a user-provided path parameter with no validation. This allows any process on localhost to read arbitrary files (e.g., /etc/passwd, ~/.ssh/id_rsa) by requesting /api/image?path=<any-path>. This commit adds: - Path validation requiring image file extensions (png, jpg, gif, etc.) - Path resolution via path.resolve() to normalize traversal sequences - Upload extension validation against the same image allowlist - Shared image.ts module used by all three servers (plan, review, annotate) [agent]
Author Dor Tzur Committer GitHub Date (Feb 18, 2026, 5:50 PM UTC) Commit
Copy SHA
Parent 6a2e7dbd 6a2e7dbd74c5ed94c3018f6ef91a71a4ec1ee257