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

Fix header url param to not render html to resolve XSS #346

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

Conversation

elongstreet88
Copy link

@elongstreet88 elongstreet88 commented Oct 26, 2023

Fixes #345
http://localhost:2222/ssh/host/mydevice.local?header=<img src=x onerror=alert('XSS')>

Before:
image

After:
image

Note - This could be breaking if someone is using the header for HTML rendering, however, i would say this is still justified.

@sonarcloud
Copy link

sonarcloud bot commented Oct 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@elongstreet88 elongstreet88 changed the title Fix header url param to not render html Fix header url param to not render html to resolve XSS Oct 26, 2023
dfajfb added a commit to dfamilk/webssh2 that referenced this pull request Jan 26, 2024
- PR billchurch#346 submitted by Eric to the original repo fixes xss bug
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.

Cross Site Script (XSS) attack on at least the header url param
1 participant