Skip to content

[Precogs AI - Fix] Insecure Temporary File Handling (predictable filename) (High) in Employee-Management-System/Employee Management System-github.c#1

Open
sameer6pre wants to merge 1 commit intomasterfrom
precogs/auto-fix/high-1774610288043
Open

[Precogs AI - Fix] Insecure Temporary File Handling (predictable filename) (High) in Employee-Management-System/Employee Management System-github.c#1
sameer6pre wants to merge 1 commit intomasterfrom
precogs/auto-fix/high-1774610288043

Conversation

@sameer6pre
Copy link
Copy Markdown
Owner

Precogs Auto-Fix

Vulnerability: Insecure Temporary File Handling (predictable filename)
Severity: High
File: Employee-Management-System/Employee Management System-github.c
CWE: CWE-377

What was fixed

The code creates/opens a temporary file with a predictable static name "temp.txt" in the current directory. An attacker can pre-create this filename (or a symlink) to cause the program to overwrite or write to an unintended file (race condition/TOCTOU), leading to data loss, privilege escalation, or file corruption.

This PR was automatically generated by Precogs AI. Review the changes before merging.

… in branch precogs/auto-fix/high-1774610288043
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant