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

CGI_Reflected_XSS_All_Clients @ BenchmarkTest00134.java #5464

Open
joaoreis-cx opened this issue Jan 4, 2023 · 0 comments
Open

CGI_Reflected_XSS_All_Clients @ BenchmarkTest00134.java #5464

joaoreis-cx opened this issue Jan 4, 2023 · 0 comments

Comments

@joaoreis-cx
Copy link
Owner

CGI_Reflected_XSS_All_Clients issue exists @ BenchmarkTest00134.java in branch master

The method doPost embeds untrusted data in generated output with println, at line 82 of /src/main/java/org/owasp/benchmark/testcode/BenchmarkTest00134.java. 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 output data by simply sending modified values in the user input getHeader, which is read by the doPost method at line 45 of /src/main/java/org/owasp/benchmark/testcode/BenchmarkTest00134.java. This input then flows through the code, and written to the console or STDOUT, without sanitization. In some scenarios, this output will also be sent back to the user's browser. 

This can enable a Reflected Cross-Site Scripting (XSS) attack if the code's console output is used by the application as part of a web-page, as often occurs with CGI scripts.

Namespace: joaoreis-cx
Repository: test1
Repository Url: https://github.com/joaoreis-cx/test1
CxAST-Project: joaoreis-cx/test1
CxAST platform scan: 53506292-d41c-434c-8792-e513700a84e7
Branch: master
Application: test1
Severity: MEDIUM
State: TO_VERIFY
Status: RECURRENT
CWE: 79
Lines: 45


References
Read more

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