Skip to content

fix(error-response-plugin): percentage-encode path to limit XSS #1134

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MegaManSec
Copy link

Ensures all unsafe characters in the request URL are percent-encoded before including the path in the error response, mitigating XSS risks.

Visiting the proxied page https://host.com/?<script>alert(document.cookie);</script> when an error occured, would result in the js being executed.

Motivation and Context

We don't want to render arbitrary HTML and execute arbitrary just because it's in the path.

How has this been tested?

manually

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant