mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:45:32 -05:00
doc: clarify callback exceptions
Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/63939 Fixes: https://github.com/nodejs/security-wg/issues/1568 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
1 parent
688e792551
commit
d74b3a7e90
1 file changed
+15
+15
@@ -374,6 +374,21 @@ the community they pose.
|
||||
responsibility to properly handle errors by attaching appropriate
|
||||
`'error'` event listeners to EventEmitters that may emit errors.
|
||||
|
||||
#### Exceptions Thrown by Application Callbacks (CWE-248)
|
||||
|
||||
* Node.js trusts the application code it is asked to run, including callbacks
|
||||
that are invoked by Node.js APIs. If an application callback throws an
|
||||
uncaught exception, any resulting crash is not considered a vulnerability in
|
||||
Node.js.
|
||||
* For example, [CVE-2026-21637](https://www.cve.org/CVERecord?id=CVE-2026-21637)
|
||||
was triaged as a Node.js vulnerability, but scenarios that require TLS
|
||||
callbacks such as `ALPNCallback`, `SNICallback`, or `pskCallback` to throw
|
||||
are outside the Node.js threat model. Future reports of similar issues,
|
||||
where the crash depends on application callbacks throwing uncaught
|
||||
exceptions, will not be treated as Node.js vulnerabilities. It is the
|
||||
application's responsibility to handle unexpected callback input and report
|
||||
errors without throwing uncaught exceptions.
|
||||
|
||||
#### Permission Model Boundaries (`--permission`)
|
||||
|
||||
The Node.js [Permission Model](https://nodejs.org/api/permissions.html)
|
||||
|
||||
Reference in new issue
Block a user