CVE-2026-33711: Insecure Tmp File Creation

Creating a file in a shared temporary directory with a predictable name and without `os.O_EXCL` allows local attackers to mount a symlink attack. If an attacker pre-creates a symlink at the predictable path, opening or creating the file will follow the symlink and overwrite the target file. Use `os.CreateTemp` to safely create temporary files, or provide `os

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-33711-insecure-tmp-file-creation --engine opengrep

Description

Creating a file in a shared temporary directory with a predictable name and without `os.O_EXCL` allows local attackers to mount a symlink attack. If an attacker pre-creates a symlink at the predictable path, opening or creating the file will follow the symlink and overwrite the target file. Use `os.CreateTemp` to safely create temporary files, or provide `os