Property
Languagego
Severitylow
CWECWE-377: Insecure Temporary File
OWASPA01:2021 - Broken Access Control
Confidence LevelLow
Impact LevelLow
Likelihood LevelLow

Description#

The code creates files directly in the shared /tmp directory without using Go’s ioutil.TempFile, which can lead to predictable filenames and race conditions. This makes it possible for other users or processes to interfere with or access those files.

Impact#

An attacker could create or manipulate temporary files in /tmp before your code runs, potentially leading to data leaks, unauthorized file modification, or even code execution. This can compromise sensitive data or the stability of your application.