Skip to content

Security Issue #8315

Description

@7h3h4ckv157

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

IMG-20220902-214912.jpg

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 ↓

1.  Run the python code (Start the service)

2.  Visit the service

3.  Use reversed XSS payloads. Eg: > >)niamod.tnemucod(trela=daolno/gvs<

4.  XSS can triggered on "/reverse_string?string=" parameter

5. Done

Proof of Concept ↓

poc.png

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,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.samplesIssues that are directly related to samples.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions