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

Reflected_XSS @ /packages/server/src/routes.ts #70

Open
electricmonk opened this issue Nov 6, 2023 · 0 comments
Open

Reflected_XSS @ /packages/server/src/routes.ts #70

electricmonk opened this issue Nov 6, 2023 · 0 comments

Comments

@electricmonk
Copy link
Owner

Checkmarx (SAST): Reflected_XSS
Security Issue: Read More about Reflected_XSS
Checkmarx Project: electricmonk/ts-react-tdd
Repository URL: https://github.com/electricmonk/ts-react-tdd
Branch: main
Scan ID: e0708f2c-1083-45f2-a7cb-929f9b6a0c6c


The method Cxd8f35764 embeds untrusted data in generated output with send, at line 119 of /packages/server/src/routes.ts. This untrusted data is embedded into the output without proper sanitization or encoding, enabling an attacker to inject malicious code into the generated web-page.

The attacker would be able to alter the returned web page by simply providing modified data in the user input params, which is read by the Cxd8f35764 method at line 114 of /packages/server/src/routes.ts. This input then flows through the code straight to the output web page, without sanitization. 

This can enable a Reflected Cross-Site Scripting (XSS) attack.

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

    1. params: /packages/server/src/routes.ts[114,35]
    2. anony_75946c4b: /packages/server/src/routes.ts[114,29]
    3. anony_75946c4b: /packages/server/src/routes.ts[114,29]
    4. orderId: /packages/server/src/routes.ts[114,20]
    5. orderId: /packages/server/src/routes.ts[114,20]
    6. orderId: /packages/server/src/routes.ts[119,55]
    7. send: /packages/server/src/routes.ts[119,33]
    Review result in Checkmarx One: Reflected_XSS

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

    1. body: /packages/server/src/routes.ts[133,58]
    2. create: /packages/server/src/routes.ts[133,47]
    3. AwaitExpr: /packages/server/src/routes.ts[133,29]
    4. product: /packages/server/src/routes.ts[133,19]
    5. product: /packages/server/src/routes.ts[134,34]
    6. send: /packages/server/src/routes.ts[134,29]
    Review result in Checkmarx One: Reflected_XSS

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