-
-
Notifications
You must be signed in to change notification settings - Fork 673
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
Implement Rate Limiting to Prevent Mail Bomb Attacks #1760
Comments
I would say we have it general covered by anti-automation requirements 11.2.1 and 11.2.2 (like you mentioned yourself). I don't think we need special requirement for each separate topic, such as sending too many mails, although we have separate requirement for authentication.
One-two abstract requirements are better in a way - if you put some specific requirement on some topic, it may give understanding, that only those are required to protect and rest of it is not. With abstract requirement it matches for all. In general, maybe it's more point of view - I don't watch ASVS as testing framework which need to cover all test-cases, but reporting framework, which you can use to report your findings. So, for my point of view 11.2.1 and 11.2.2 are enough to cover mail-bomb or whatever mass-call to some functionality problems. |
I also think that mail bombs can pose a risk, even though I think that the impact is not that great. I agree with Elar that the current requirements are sufficient. It could be helpful to add another example to 11.2.2, but even then I would prefer describing it as restricting interaction with other systems, or restricting out-of-band communication, rather than email specific. |
@ImanSharaf - do you agree that it is covered by 11.2.2 (with or without text improvements) or you have some arguments why it should be separate requirement? |
What is your opinion @tghosth ? |
Nice arguments and it's good to understand the logic behind proposals. One thing which I pointed out before:
So direction where I don't want ASVS to go is:
|
Hi @ImanSharaf, Thanks for the detailed arguments. I have tried to respond to each of them. Firstly, my overall preference is that we should have a single requirement per separate protection mechanism which is needed. To me ASVS is most important as a standard for developers as otherwise we won't really have anything to verify :) Email sending is fundamentally a business logic function. The threat of overuse of business logic functions such as creating new records, uploading files, etc, can lead to a variety of consequences. However, ultimately the protection/solution is an effective rate-limiting solution. If we talk about SMTP/IMAP injection, that is not a business logic issue but rather a technical issue about how the app interacts with the protocol. As such, it would need a separate requirement to implement a specific solution against this type of threat. However, a rate limiting solution should cover the threat of overuse of all business logic functions. Regarding your specific points:
I agree in principle but like I said the granularity should generally be at the solution level, not necessarily the consequence/threat level.
Hopefully the explanation above makes my perspective on this clearer.
I think that I would expect an auditor/tester to find and highlight these type of business logic issues. From a developer perspective, I am hoping that once 11.2.2 starts the conversation about rate-limiting, it will lead to a comprehensive solution.
Same answer: From a developer perspective, I am hoping that once 11.2.2 starts the conversation about rate-limiting, it will lead to a comprehensive solution.
Again, I think the threat is not specific compared to other business logic replay issues. Also, the more requirements we have, the harder it gets to benchmark :)
Again, I think the threat is not specific compared to other business logic replay issues.
Again, I think the threat is not specific compared to other business logic replay issues.
I think we can clarify 11.2.2 to make this line of thinking clearer and maybe even add some explanatory text to the 11.2 section to explain in more detail. But I don't think this warrants a new requirement. |
So, general agreement seems to be, that we don't need new separate requirement to cover it. The question stays, do we need to mention or cover it in 12.2.2? ping @Sjord @tghosth @ImanSharaf |
Ok so what do we think about the following? I have deliberately tried to retarget the text to be more specific.
|
I'm ok with current one and ok with proposed one. For me the meaning is the same. To list those examples is good and bad - good to give some ideas for those who need them; bad as it may kill ideas with only listed issues as it is general problem. |
I hear that but I think I would rather have the examples and let the "etc" do the extra work 🤣 @ImanSharaf do you have any further thoughts? |
What do you think about this one? 11.2.2 [MODIFIED, MOVED FROM 11.1.4] Verify that the application has anti-automation controls to protect against excessive calls to application functionality which could result in mass data exfiltration, junk data creation, resource quota exhaustion, rate limit breaches, out-of-band communication flooding, denial of service, overuse of an expensive resource, etc. ✓ ✓ ✓ 770 |
I'm good with that, @ImanSharaf do you want to open a PR? |
Sure. I will do that. |
Please check it here |
done via #1775 |
While we do have controls in the ASVS to verify against rapid transaction submissions (11.2.1) and to safeguard against excessive calls like mass data exfiltration, DoS attacks, etc. (11.2.2), we currently do not have a specific check against mail bomb attacks.
Applications with functionalities like password reset or email notifications often allow email sending without any rate limits. Malicious actors can exploit this to flood a target's mailbox, making it an attractive medium for mail bomb attacks. The impacts of such an attack can be significant:
Blacklisting: The mail server might get blacklisted by email providers, affecting its reputation and future deliverability.
SaaS Penalties: If a third-party SaaS solution is used to dispatch emails, the account could be banned or penalized for contravening its use policies.
ASVS Addition:
Ensure that functionalities allowing email sending have an associated rate limit to prevent abuse.
The text was updated successfully, but these errors were encountered: