VDB
Sign up
MEDIUM6.5

GHSA-q2qh-cgc2-qhr3

Directory Traversal in serve

Quick fix

GHSA-q2qh-cgc2-qhr3 — serve: upgrade to the fixed version with the command below.

npm install serve@6.4.9

Details

Affected versions of `serve` do not properly handle `%2e` (.) and `%2f` (/) characters, and allow the, characters to be used in paths. This can be used to traverse the directory tree and list content of any directory the user running the process has access to.

Mitigating factors: This vulnerability only allows listing of directory contents and does not allow reading of arbitrary files.

## Recommendation

Update to version 6.4.9 later.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/serve
Introduced in: 0Fixed in: 6.4.9
Fixnpm install serve@6.4.9

References