The temporary files directory name is very predictable, while appearing to be random. Most of the time, the directory name is tmp.fa37JncCHr. This could potentially be a security issue. It would be better if the temporary file directory had a more random name that cannot be predicted by a potential attacker.
As an example of an attack:
- User A starts spring.
- User A's spring checks for the existence of tmp.fa37JncCHr.
- User B creates tmp.fa37JncCHr as a symlink pointing to another directory that they do not have write access to.
- User A's spring tries to create the directory tmp.fa37JncCHr but fails.
- User A's spring starts writing files into the directory, potentially damaging existing files in the directory user B linked it to.
This allows user B to cause writes to appear in a directory they do not have write access to.
The temporary files directory name is very predictable, while appearing to be random. Most of the time, the directory name is tmp.fa37JncCHr. This could potentially be a security issue. It would be better if the temporary file directory had a more random name that cannot be predicted by a potential attacker.
As an example of an attack:
This allows user B to cause writes to appear in a directory they do not have write access to.