forked from typpo/quickchart
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
A reflected cross-site scripting vulnerability exists where user-provided input is written directly to an HTTP response without proper sanitization.
Location
- File: index.js
- Line: 356
Issue
User input (from an HTTP request) is directly incorporated into the response without proper sanitization or escaping, allowing for a cross-site scripting attack. This is commonly known as reflected XSS.
Recommendation
To fix this issue:
- Implement proper HTML escaping before writing user input to responses
- Use a library like escape-html or DOMPurify to sanitize user-provided values
- Consider implementing Content Security Policy (CSP) headers as an additional defense layer
Example Fix
Replace:
With:
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels