Skip to content

Availability: JSON DoS Vulnerability:An attacker sends a very large JSON message (like 100MB) to the server.#89

Merged
imxade merged 1 commit intoAOSSIE-Org:mainfrom
aniket866:fixing-json-attack
Feb 16, 2026
Merged

Availability: JSON DoS Vulnerability:An attacker sends a very large JSON message (like 100MB) to the server.#89
imxade merged 1 commit intoAOSSIE-Org:mainfrom
aniket866:fixing-json-attack

Conversation

@aniket866
Copy link
Contributor

Addressed Issues:

Closes #88

Why need fix:

An attacker sends a very large JSON message (like 100MB) to the server.
The server tries to parse it immediately on the main thread, which takes a long time and blocks everything else.
During that time, no other users can use the system, causing a Denial of Service.

Issue: JSON.parse(raw) is called on the main thread without checking payload size.

Fix: Check data.length before parsing and reject messages larger than a specific limit (e.g., 10KB).

Why?: An attacker can send a massive JSON string (e.g., 100MB), causing the single-threaded server to freeze while parsing it (Denial of Service).

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.

⚠️ AI Notice - Important!

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 14, 2026

Warning

Rate limit exceeded

@aniket866 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@aniket866
Copy link
Contributor Author

@imxade Please merge this fix , Let me know if any issue
Thankyou

@imxade imxade merged commit fc04f59 into AOSSIE-Org:main Feb 16, 2026
2 checks passed
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.

[Bug]: Availability: JSON DoS Vulnerability:An attacker sends a very large JSON message (like 100MB) to the server.

2 participants