expressjs / expressjs/serve-static

Disable symlinks

Open
#120 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
1.4k
Forks
241
PR merge metrics
No merged PRs in 30d

Description

If I'm doing `.use(express.static('/var/www/html'))` and some attacker manages to `ln -s /etc/passwd /var/www/html`, then http://host/passwd will serve up /etc/passwd. Is there any way to tell serve-static not to follow symlinks, or to restrict them so that they're only followed to files within the directory being served?

I'm essentially asking for Apache's FollowSymLinks or nginx's disable_symlinks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.