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

Parameter_Tampering @ /Controllers/RegistrationsController.cs #71

Open
msant262 opened this issue Jun 16, 2024 · 0 comments
Open

Parameter_Tampering @ /Controllers/RegistrationsController.cs #71

msant262 opened this issue Jun 16, 2024 · 0 comments

Comments

@msant262
Copy link

msant262 commented Jun 16, 2024

Checkmarx (SAST): Parameter_Tampering
Security Issue: Read More about Parameter_Tampering
Checkmarx Project: Nova-8/Damm-Vulnerable-CSharp-API
Repository URL: https://github.com/Nova-8/Damm-Vulnerable-CSharp-API
Branch: master
Scan ID: 2f22541b-da6c-459f-9285-99da61e0ed7d


Method Post at line 22 of /Controllers/RegistrationsController.cs gets user input from element registrationRequest. This input is later concatenated by the application directly into a string variable containing SQL commands, without being validated. This string is then used in method Post to query the database FirstOrDefault, at line 31 of /Controllers/RegistrationsController.cs, without any additional filtering by the database. This could allow the user to tamper with the filter parameter.

Result 1:
Severity: MEDIUM
State: TO_VERIFY
Status: RECURRENT
Attack Vector:

    1. registrationRequest: /Controllers/RegistrationsController.cs[22,64]
    2. registrationRequest: /Controllers/RegistrationsController.cs[30,35]
    3. email: /Controllers/RegistrationsController.cs[30,55]
    4. Lambda: /Controllers/RegistrationsController.cs[30,21]
    5. Where: /Controllers/RegistrationsController.cs[30,13]
    6. FirstOrDefault: /Controllers/RegistrationsController.cs[31,13]
    Review result in Checkmarx One: Parameter_Tampering

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