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 Stored XSS #5

Closed
wants to merge 1 commit into from
Closed

Fix Stored XSS #5

wants to merge 1 commit into from

Conversation

gtsp233
Copy link

@gtsp233 gtsp233 commented Oct 29, 2023

Hi, I've discovered stored Cross-Site Scripting (XSS) vulnerabilities in this repository:

Vulnerability Details:
Version Affected: All versions
Severity: [High/Critical – Stored XSS can have a significant impact. Adjust based on your assessment]
Description: The vulnerability allows malicious attacks to inject scripts through a direct network request. Once embedded, any user viewing the story list or the specific story's details will execute the malicious script.
Steps to Reproduce:
Send a direct network request (bypassing the user interface) to /story/addstory with a payload content containing the malicious script: .
After the story is successfully created, any user who views the story list or the specific story's details will run the malicious script.
Suggested Fix or Mitigation:
Server-side: Within the addStory controller, it's essential to sanitize the user's input (content) before processing it to ensure malicious scripts are neutralized.
Client-side: Prior to displaying the story's content using dangerouslySetInnerHtml, ensure that the content is sanitized using tools like DOMPurify to avert script execution.

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.

2 participants