Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CX SQL_Injection @ iGoat-Swift/iGoat-Swift/Source/Exercises/Injection Flaws/SQL Injection/SQLInjectionExerciseVC.swift [master] #6

Open
tsunez opened this issue Sep 1, 2020 · 3 comments

Comments

@tsunez
Copy link
Collaborator

tsunez commented Sep 1, 2020

SQL_Injection issue exists @ iGoat-Swift/iGoat-Swift/Source/Exercises/Injection Flaws/SQL Injection/SQLInjectionExerciseVC.swift in branch master

Method search at line 7 of iGoat-Swift\iGoat-Swift\Source\Exercises\Injection Flaws\SQL Injection\SQLInjectionExerciseVC.swift gets user input from the text element. This element’s value then flows through the code without being properly sanitized or validated, and is eventually used in a database query in method search at line 7 of iGoat-Swift\iGoat-Swift\Source\Exercises\Injection Flaws\SQL Injection\SQLInjectionExerciseVC.swift. This may enable an SQL Injection attack.

Severity: High

CWE:89

Vulnerability details and guidance

Checkmarx

Recommended Fix

Lines: [17](https://github.com/Custodela/iGoat-Swift/blob/master/iGoat-Swift/iGoat-Swift/Source/Exercises/Injection Flaws/SQL Injection/SQLInjectionExerciseVC.swift#L17)


[Code (Line #17):](https://github.com/Custodela/iGoat-Swift/blob/master/iGoat-Swift/iGoat-Swift/Source/Exercises/Injection Flaws/SQL Injection/SQLInjectionExerciseVC.swift#L17)

             searchStr = "%" + "\(searchField.text!)" + "%"

@tsunez
Copy link
Collaborator Author

tsunez commented Sep 2, 2020

Issue still exists.

SUMMARY

Issue has 1 vulnerability/vulnerabilities left to be fixed (Please scroll to the top for more information)

2 similar comments
@tsunez
Copy link
Collaborator Author

tsunez commented Sep 2, 2020

Issue still exists.

SUMMARY

Issue has 1 vulnerability/vulnerabilities left to be fixed (Please scroll to the top for more information)

@tsunez
Copy link
Collaborator Author

tsunez commented Sep 2, 2020

Issue still exists.

SUMMARY

Issue has 1 vulnerability/vulnerabilities left to be fixed (Please scroll to the top for more information)

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

No branches or pull requests

1 participant