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/vulnerability/forum.jsp #114

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

SQL_Injection @ /src/main/webapp/vulnerability/forum.jsp #114

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 forum method executes an SQL query with executeUpdate, at line 48 of /src/main/webapp/vulnerability/forum.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 ""title""; this input is then read by the forum method at line 43 of /src/main/webapp/vulnerability/forum.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. ""title"": /src/main/webapp/vulnerability/forum.jsp[43,71]
    2. getParameter: /src/main/webapp/vulnerability/forum.jsp[43,70]
    3. title: /src/main/webapp/vulnerability/forum.jsp[43,44]
    4. title: /src/main/webapp/vulnerability/forum.jsp[48,126]
    5. executeUpdate: /src/main/webapp/vulnerability/forum.jsp[48,61]
    Review result in Checkmarx One: SQL_Injection

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

    1. ""user"": /src/main/webapp/vulnerability/forum.jsp[41,70]
    2. getParameter: /src/main/webapp/vulnerability/forum.jsp[41,69]
    3. user: /src/main/webapp/vulnerability/forum.jsp[41,44]
    4. user: /src/main/webapp/vulnerability/forum.jsp[48,138]
    5. executeUpdate: /src/main/webapp/vulnerability/forum.jsp[48,61]
    Review result in Checkmarx One: SQL_Injection

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

    1. ""content"": /src/main/webapp/vulnerability/forum.jsp[42,73]
    2. getParameter: /src/main/webapp/vulnerability/forum.jsp[42,72]
    3. content: /src/main/webapp/vulnerability/forum.jsp[42,44]
    4. content: /src/main/webapp/vulnerability/forum.jsp[48,112]
    5. executeUpdate: /src/main/webapp/vulnerability/forum.jsp[48,61]
    Review result in Checkmarx One: SQL_Injection

@cyates-checkmarx cyates-checkmarx changed the title SQL_Injection @ forum.jsp SQL_Injection @ /src/main/webapp/vulnerability/forum.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