Skip to content

Commit dfb72d1

Browse files
RafaelGSSaduh95
authored andcommitted
doc: add constraints for mem leak to threat model
As discussed in nodejs-private/node-private#719. We should clarify what the criteria are to accept memory leak as a vulnerability (potential DoS). Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #58917 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 075d196 commit dfb72d1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

SECURITY.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,21 @@ does not trust is considered a vulnerability:
109109
the correct use of Node.js APIs.
110110
* The unavailability of the runtime, including the unbounded degradation of its
111111
performance.
112+
* Memory leaks qualify as vulnerabilities when all of the following criteria are met:
113+
* The API is being correctly used.
114+
* The API doesn't have a warning against its usage in a production environment.
115+
* The API is public and documented.
116+
* The API is on stable (2.0) status.
117+
* The memory leak is significant, causing a DoS fast or in a user-uncontrolled space (for instance, on HTTP parsing).
118+
* The memory leak is directly exploitable by an untrusted source without requiring application mistakes.
119+
* The leak cannot be reasonably mitigated through standard operational practices (like process recycling).
120+
* The leak occurs deterministically under normal usage patterns rather than edge cases.
121+
* The leak occurs at a rate that would cause practical resource exhaustion within a practical timeframe under
122+
typical workloads.
123+
* The attack demonstrates [asymmetric resource consumption](https://cwe.mitre.org/data/definitions/405.html),
124+
where the attacker expends significantly fewer resources than what's required by the server to process the
125+
attack. Attacks requiring comparable resources on the attacker's side (which can be mitigated through common
126+
practices like rate limiting) may not qualify.
112127

113128
If Node.js loads configuration files or runs code by default (without a
114129
specific request from the user), and this is not documented, it is considered a

0 commit comments

Comments
 (0)