Skip to content

block reading snapshots outside of the data dir - #21

Open
adkron wants to merge 1 commit into
chassisframework:mainfrom
adkron:safe-pathing
Open

block reading snapshots outside of the data dir#21
adkron wants to merge 1 commit into
chassisframework:mainfrom
adkron:safe-pathing

Conversation

@adkron

@adkron adkron commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The current implementation does not try to look at the traversals and allowed me to read files outside of the data-directory. This could lead to a data leak if the wrong person was able to get tcp access. Since this is exposed through TCP I think that is possible.

The path is now checked with Path.safe_relative/2 to ensure that the path stays in the starting directory or down.

The current implementation does not try to look at the traversals and
allowed me to read files outside of the data-directory. This could lead
to a data leak if the wrong person was able to get tcp access.

The path is now checked with `Path.safe_relative/2` to ensure that the
path stays in the starting directory or down.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant