mojira.dev
MC-308240

`level-name` in server.properties allows file paths

level-name in server.properties does not have any kind of input sanitization, allowing values such as empty string, resulting in world files being put in server’s root directory. It is also possible to walk the filepath using “../“ or even use absolute paths “/home/random_minecraft_user/world“.

This will cause user error (and it already has in modding space, that's why I’m here reporting this).

Attachments

Comments 3

Thank you for helping us improve Minecraft! We saved your files:

[media]

This is working as intended. The level-name can be both an absolute path, or a path relative to the working directory or the value of the --universe command line option if provided.

Paweł Michalewski

(Unassigned)

Community Consensus

Platform

Normal

Dedicated Server

26.1.2, 26.3, 26.4 Snapshot 10

Retrieved