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

SQL_Injection @ /Registration.cs #2

Open
apcxtest opened this issue Nov 3, 2023 · 0 comments
Open

SQL_Injection @ /Registration.cs #2

apcxtest opened this issue Nov 3, 2023 · 0 comments

Comments

@apcxtest
Copy link
Owner

apcxtest commented Nov 3, 2023

Checkmarx (SAST): SQL_Injection
Security Issue: Read More about SQL_Injection
Applications: test_App
Checkmarx Project: apcxtest/test-repo-pub2
Repository URL: https://github.com/apcxtest/test-repo-pub2
Branch: main
Scan ID: 5072abd4-8e3e-49e3-b1b5-44426e72387c


The application's Reg_update_Click method executes an SQL query with ExecuteNonQuery, at line 365 of /Registration.cs. The application constructs this SQL query by embedding an untrusted string into the query without proper sanitization. The concatenated string is submitted to the database, where it is parsed and executed accordingly.

An attacker would be able to inject arbitrary syntax and data into the SQL query, by crafting a malicious payload and providing it via the input Value; this input is then read by the Reg_update_Click method at line 327 of /Registration.cs. This input then flows through the code, into a query and to the database server - without sanitization.

This may enable an SQL Injection attack.

Result #1:
Severity: HIGH
State: TO_VERIFY
Status: RECURRENT
Attack Vector:

    1. Value: /Registration.cs[327,79]
    2. ToSQL: /Registration.cs[327,57]
    3. sWhere: /Registration.cs[327,14]
    4. sWhere: /Registration.cs[358,36]
    5. sSQL: /Registration.cs[358,10]
    6. sSQL: /Registration.cs[363,39]
    7. OleDbCommand: /Registration.cs[363,22]
    8. cmd: /Registration.cs[363,16]
    9. cmd: /Registration.cs[365,5]
    10. ExecuteNonQuery: /Registration.cs[365,9]
    Review result in Checkmarx One: SQL_Injection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant