Skip to content

Temporary files directory name is predictable #41

@exeter-matthew-wakeling

Description

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:

  1. User A starts spring.
  2. User A's spring checks for the existence of tmp.fa37JncCHr.
  3. User B creates tmp.fa37JncCHr as a symlink pointing to another directory that they do not have write access to.
  4. User A's spring tries to create the directory tmp.fa37JncCHr but fails.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions