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

XS_Second_Order_SQL_Injection @ /src/sample.xsjs #4

Open
thtri opened this issue Aug 2, 2023 · 0 comments
Open

XS_Second_Order_SQL_Injection @ /src/sample.xsjs #4

thtri opened this issue Aug 2, 2023 · 0 comments

Comments

@thtri
Copy link
Owner

thtri commented Aug 2, 2023

XS_Second_Order_SQL_Injection issue exists @ sample.xsjs in branch main

The application's createBasketForUser method executes an SQL query with query, at line 75 of /src/sample.xsjs. 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.

The attacker may be able to write arbitrary data to the database, which is then retrieved by the application with executeQuery in createBasketForUser method at line 66 of /src/sample.xsjs. This data then flows through the code, until it is used directly in the SQL query without sanitization, and then submitted to the database server for execution.

This may enable a Second-Order SQL Injection attack.

Namespace: thtri
Repository: cx1-test-feedback-app
Repository Url: https://github.com/thtri/cx1-test-feedback-app
CxAST-Project: thtri/cx1-test-feedback-app
CxAST platform scan: d9bb4146-322f-4d77-9ac6-7a858eaa2c1a
Branch: main
Application: cx1-test-feedback-app
Severity: HIGH
State: TO_VERIFY
Status: RECURRENT
CWE: 89
Lines: 66


References
Read more

@thtri thtri closed this as completed Sep 11, 2023
@thtri thtri reopened this Sep 11, 2023
@thtri thtri closed this as completed Sep 11, 2023
@thtri thtri reopened this Sep 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