Open cjackett opened 3 months ago
Thanks again for participating! This submission earned $0.00 from SIV and $107.29 from the Public Vote, for a total of $107.29.
Here's what we noted in our evaluation:
Issue to track getting paid: https://github.com/siv-org/hack.siv.org/issues/10
Issue Description
Note: This issue is a refinement of https://github.com/siv-org/siv/issues/193, separating concerns related to CORS and focusing on a potential DoS attack vector.
During recent local testing, it was discovered that the
email-signup
endpoint (/api/email-signup
) is vulnerable to resource abuse attacks, which could result in a denial of service (DoS). A stress test involving a large number of concurrent requests to this endpoint caused significant strain on the server, leading to eventual failure.Exploitation Script
The following Python script was used to simulate a DoS attack by sending multiple concurrent requests to the
email-signup
endpoint:Testing Results
The script successfully sent a high volume of requests to the
email-signup
endpoint, resulting in substantial server load. The development server issued aMaxListenersExceededWarning
, indicating possible memory leaks due to the excessive number of concurrent requests:Although the SIV website remained partially responsive, intermittent slowdowns were observed. Eventually, the backend began generating HTTP 500 errors, signaling its inability to handle the excessive request load:
Mitigation
While the production SIV system implements rate limiting as a countermeasure against such attacks, no rate limiting code was found in the current codebase.
Recommendations:
Verify Rate Limiting: Ensure that rate limiting is active and properly configured for all critical endpoints, including
email-signup
.Stress Testing: Conduct regular stress testing on the production environment to ensure that it can withstand high volumes of traffic without degrading performance or becoming unavailable.
EventEmitter Configuration: Review and adjust the
MaxListeners
setting or refactor the code to prevent memory leaks under high load conditions.