Local information disclosure can occur when files/directories are written into +directories that are shared between all users on the system.
+ +On most unix-like systems, +the system temporary directory is shared between local users. +If files/directories are created within the system temporary directory without using +APIs that explicitly set the correct file permissions, local information disclosure +can occur.
+ +Depending upon the particular file contents exposed, this vulnerability can have a +CVSSv3.1 base score of 6.2/10.
+Use JDK methods that specifically protect against this vulnerability:
+ + +Otherwise, create the file/directory by manually specifying the expected posix file permissions.
+For example: PosixFilePermissions.asFileAttribute(EnumSet.of(PosixFilePermission.OWNER_READ, PosixFilePermission.OWNER_WRITE))
In the following example, files and directories are created with file permissions that allow other local users to read their contents.
+ +In the following example, files and directories are created with file permissions that protect their contents.
+ +