-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Open
Labels
🐞 bugSomething isn't workingSomething isn't working
Description
Self Checks
- I have read the Contributing Guide and Language Policy.
- This is only for bug report, if you would like to ask a question, please head to Discussions.
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report, otherwise it will be closed.
- 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- Please do not modify this template :) and fill in all the required fields.
Dify version
main
Cloud or Self Hosted
Cloud
Steps to reproduce
- Navigate to any check-code page with malicious email parameter:
http://localhost:3000/signin/[email protected]<script>alert('XSS')</script>
- Observe the page rendering behavior
Expected Behavior
The email address should be displayed as plain text with HTML tags visible as literal characters:
We send a verification code to [email protected]<script>alert('XSS')</script>
✔️ Expected Behavior
The email address should be displayed as plain text with HTML tags visible as literal characters:
We send a verification code to [email protected]<script>alert('XSS')</script>
❌ Actual Behavior
Code-level vulnerability exists: The application uses dangerouslySetInnerHTML
with unvalidated user input from URL parameters:
<span dangerouslySetInnerHTML={{ __html: t('login.checkCode.tips', { email }) as string }}></span>
Where email
comes directly from:
const email = decodeURIComponent(searchParams.get('email') as string)
dosubot
Metadata
Metadata
Assignees
Labels
🐞 bugSomething isn't workingSomething isn't working