Skip to content

[Precogs Alert] SQL Injection detected (CWE-89, Risk: Critical) - #1

Open
sameer6pre wants to merge 1 commit into
masterfrom
Precogs-fix-gxk5sz4y
Open

sameer6pre wants to merge 1 commit into
masterfrom
Precogs-fix-gxk5sz4y

Conversation

@sameer6pre

Copy link
Copy Markdown
Owner

Vulnerability Details

  • File Path: shiftleft-python-demo/flask_webgoat/auth.py
  • Vulnerability Type: SQL Injection
  • Risk Level: Critical

Explanation:
The code constructs an SQL string by directly interpolating untrusted username and password values into the SQL statement using Python string formatting. This allows an attacker to inject SQL syntax (e.g., quote-terminators and comments) into the query. The resulting string is passed unchanged to query_db(), which executes it against the database. There is no input validation or parameterization, so typical SQL injection payloads will alter the executed query logic.

Please review and address the issue accordingly.

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