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

Fixed XSS stored on campaign delete button #2991

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

msegoviag
Copy link

@msegoviag msegoviag commented Oct 5, 2023

This pull request fixes an XSS vulnerability stored in the campaign section. When creating a campaign named with Javascript code it is executed at the moment the campaign is deleted as the text displayed in the campaign delete confirmation button does not implement proper sanitisation. The escapeHtml() method has been correctly implemented in campaings.js to fix this vulnerability.

PoC:
https://youtu.be/UoVWliuAa6s

@FLX-0x00
Copy link
Contributor

FLX-0x00 commented Feb 2, 2024

Please remove any min.js files from this PR as they will be rebuilt at compile time. Also, minified js files cannot be audited in a reasonable amount of time and open the door for backdoors. We currently have our own fork and are starting to merge some PRs from here, so keep the code nice and clean. Btw. its a good finding, you should consider requesting a CVE for this if its still vulnerable.

@FLX-0x00
Copy link
Contributor

FLX-0x00 commented Feb 2, 2024

😆 sorry for that, not removing the whole thing; just removing your changes.

@FLX-0x00
Copy link
Contributor

FLX-0x00 commented Feb 2, 2024

only changes to campaings.js should be in this PR - hope that make sense

FLX-0x00 added a commit to evait-security/gophish that referenced this pull request Feb 2, 2024
Implement code from pull gophish#2991, fixing XSS vulnerability
@FLX-0x00
Copy link
Contributor

FLX-0x00 commented Feb 2, 2024

@msegoviag: checkout this PR: evait-security#6 - that is fixing the vuln. The min files will be created at build time and should only pushed automaticly by the maintainer

Touexe added a commit to Touexe/gophish that referenced this pull request Feb 21, 2024
Touexe added a commit to Touexe/gophish that referenced this pull request Feb 21, 2024
fix: Implement code from pull gophish#2991, fixing XSS vulnerability
@msegoviag
Copy link
Author

Btw. its a good finding, you should consider requesting a CVE for this if its still vulnerable.

Done, CVE requested :p

CVE-2024-2211: https://www.incibe.es/en/incibe-cert/notices/aviso/cross-site-scripting-vulnerability-gophish-admin-panel

@blazej-czuk
Copy link

How to mitigate this risk, what to do (from a user, admin perspective) to avoid Cross-Site Scripting vulnerabilities?

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.

3 participants