Skip to content

[Precogs AI - Fix] OS Command Injection (Critical) in sample-vuln/app.py#5

Open
sameer6pre wants to merge 2 commits intoPrecogs-fix-5kqi2b08from
precogs/auto-fix/critical-1774611161448
Open

[Precogs AI - Fix] OS Command Injection (Critical) in sample-vuln/app.py#5
sameer6pre wants to merge 2 commits intoPrecogs-fix-5kqi2b08from
precogs/auto-fix/critical-1774611161448

Conversation

@sameer6pre
Copy link
Copy Markdown
Owner

Precogs Auto-Fix

Vulnerability: OS Command Injection
Severity: Critical
File: sample-vuln/app.py
CWE: CWE-78

What was fixed

The ping() route embeds the user-provided ip parameter directly into a shell command executed via os.system. os.system passes the string to the shell, so an attacker can inject shell metacharacters (e.g., ;, &&) to execute arbitrary commands on the server.

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

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