[SECURITY] Prevent Path Traversal in website_handlers #15

Open
opened 2026-02-14 21:21:21 +00:00 by thabeta · 0 comments
Owner

The server allows mounting and serving content via /website/:website_hash/*path (implemented in src/server/website_handlers.rs).

Risk: Without strict path normalization and checking, an attacker could provide a path containing .. to escape the intended flist root and read arbitrary files from the storage backend.

Proposed Fix: Ensure all paths are normalized and verified to reside within the intended directory subtree before processing.

The server allows mounting and serving content via `/website/:website_hash/*path` (implemented in `src/server/website_handlers.rs`). **Risk:** Without strict path normalization and checking, an attacker could provide a path containing `..` to escape the intended flist root and read arbitrary files from the storage backend. **Proposed Fix:** Ensure all paths are normalized and verified to reside within the intended directory subtree before processing.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/my_fs#15
No description provided.