forked from typpo/quickchart
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Exception text is being reinterpreted as HTML without proper escaping of meta-characters, creating a Cross-Site Scripting (XSS) vulnerability.
Location
- File: index.js
- Lines: 116-127
Issue
When an exception occurs, the error message is directly written to an HTTP response without sanitization, which can lead to a cross-site scripting vulnerability if an attacker can influence part of the error message.
Recommendation
To fix this issue:
- Implement proper HTML escaping before writing error messages to responses
- Consider using contextual output encoding/escaping before writing error messages to the page
- Use a secure sanitization library like DOMPurify or escape-html
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels