Creation of temporary file in directory with insecure permissions in swagger-codegen - CVE-2021-21363
Published: March 9, 2021 / Updated: November 9, 2026
Vulnerability details
The vulnerability allows an unprivileged local attacker to escalate privileges through generated code that is later executed by a higher-privileged user.
The vulnerability exists due to a race condition when the swagger-codegen Generator web application replaces a temporary file with an output directory in the shared system temporary directory on Unix-like systems. An unprivileged local attacker can win this race to own the output directory and modify generated code before its execution.