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 @ /src/main/webapp/changeCardDetails.jsp #116

Open
cyates-checkmarx opened this issue Jun 23, 2023 · 0 comments
Open

SQL_Injection @ /src/main/webapp/changeCardDetails.jsp #116

cyates-checkmarx opened this issue Jun 23, 2023 · 0 comments

Comments

@cyates-checkmarx
Copy link
Owner

cyates-checkmarx commented Jun 23, 2023

Checkmarx (SAST): SQL_Injection
Security Issue: Read More about SQL_Injection
Checkmarx Project: cyates-checkmarx/JVL
Repository URL: https://github.com/cyates-checkmarx/JVL
Branch: master
Scan ID: 6bf2c567-d73e-490c-ac86-a35dd14d497b


The application's changeCardDetails method executes an SQL query with executeUpdate, at line 43 of /src/main/webapp/changeCardDetails.jsp. 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 ""cvv""; this input is then read by the changeCardDetails method at line 38 of /src/main/webapp/changeCardDetails.jsp. 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. ""cvv"": /src/main/webapp/changeCardDetails.jsp[38,41]
    2. getParameter: /src/main/webapp/changeCardDetails.jsp[38,40]
    3. cvv: /src/main/webapp/changeCardDetails.jsp[38,16]
    4. cvv: /src/main/webapp/changeCardDetails.jsp[40,35]
    5. cvv: /src/main/webapp/changeCardDetails.jsp[43,108]
    6. executeUpdate: /src/main/webapp/changeCardDetails.jsp[43,28]
    Review result in Checkmarx One: SQL_Injection

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

    1. ""expirydate"": /src/main/webapp/changeCardDetails.jsp[39,48]
    2. getParameter: /src/main/webapp/changeCardDetails.jsp[39,47]
    3. expirydate: /src/main/webapp/changeCardDetails.jsp[39,16]
    4. expirydate: /src/main/webapp/changeCardDetails.jsp[40,54]
    5. expirydate: /src/main/webapp/changeCardDetails.jsp[43,118]
    6. executeUpdate: /src/main/webapp/changeCardDetails.jsp[43,28]
    Review result in Checkmarx One: SQL_Injection

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

    1. ""cardno"": /src/main/webapp/changeCardDetails.jsp[37,44]
    2. getParameter: /src/main/webapp/changeCardDetails.jsp[37,43]
    3. cardno: /src/main/webapp/changeCardDetails.jsp[37,16]
    4. cardno: /src/main/webapp/changeCardDetails.jsp[40,13]
    5. cardno: /src/main/webapp/changeCardDetails.jsp[43,95]
    6. executeUpdate: /src/main/webapp/changeCardDetails.jsp[43,28]
    Review result in Checkmarx One: SQL_Injection

@cyates-checkmarx cyates-checkmarx changed the title SQL_Injection @ changeCardDetails.jsp SQL_Injection @ /src/main/webapp/changeCardDetails.jsp Dec 11, 2023
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