Upload Temp Directory is Everyone

Published on 02 Jul 2018
Vulnerability

The Tmp dir is used to store temporary files that need to be uploaded to the server. There are many servers having this vulnerability through which, the Upload tmp dir is accessible to everyone. The upload_tmp_dir allows a developer to specify where uploaded files should be saved until the handling script moves them to a more permanent location. If this file is within the document root of the website and/or accessible to system users other than PHP’s user, it could be modified or overwritten while PHP is processing it. By default, upload_tmp_dir is set to the system’s standard temporary directory, which can typically be accessed by all system users.

Impact

The impact include:-

  • Denial of service attack
  • Code injection attacks

Mitigation / Precaution

Beagle recommends the following fixes:-

  • Try to upload tmp dir outside the document root of the web application.
  • Make sure to Upload tmp dir to a non-readable or writable folder so that no other system users can modify the contents of the folder.
Jijith Rajan
Written by
Cyber Security Engineer

His passion for staying abreast of the latest security threats and trends, coupled with his hands-on experience, allows him to actively contribute to the protection of digital assets. Jijith's dedication and enthusiasm make him a promising talent in the ever-evolving realm of cybersecurity, promising a safer digital future.

Experience the Beagle Security platform
Unlock one full penetration test and all Advanced plan features free for 14 days
4.8 on G2 • ISO 27001 certified
See How Beagle Security Works
No credit card • No setup required
Launch interactive demo