-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Security Issue #8315
Copy link
Copy link
Closed
Labels
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.samplesIssues that are directly related to samples.Issues that are directly related to samples.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Activity
Metadata
Metadata
Assignees
Labels
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.samplesIssues that are directly related to samples.Issues that are directly related to samples.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Summary
As this repository is considered as Samples - (code for educational purposes), I don't think it's vital to report/submit more pieces of information to GoogleVRP regarding this repository. So I'm unveiling freely by making an issue here.
Details
I reviewed the source code of your open-source project and identified a potential security flaw in your code.
Vulnerable code link ↓
Click Here
Check the code and you can see the unsanitized input from an HTTP parameter flows into the return value of ReverseString, where it is used to render an HTML page returned to the user. This allows a malicious attacker to perform Cross-Site Scripting attack (XSS) through GET request itself. The end user’s browser has no way to know that the malicious script should not be trusted, and will execute the script. Because it thinks the script came from a trusted source.
Reproduction steps ↓
Proof of Concept ↓
Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user.
I hope it helps.
Cheers,