Skip to content

Commit 4e7c07d

Browse files
authored
doc: clarify callback exceptions
Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: nodejs#63939 Fixes: nodejs/security-wg#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>
1 parent d1ff9a0 commit 4e7c07d

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

SECURITY.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,21 @@ the community they pose.
374374
responsibility to properly handle errors by attaching appropriate
375375
`'error'` event listeners to EventEmitters that may emit errors.
376376

377+
#### Exceptions Thrown by Application Callbacks (CWE-248)
378+
379+
* Node.js trusts the application code it is asked to run, including callbacks
380+
that are invoked by Node.js APIs. If an application callback throws an
381+
uncaught exception, any resulting crash is not considered a vulnerability in
382+
Node.js.
383+
* For example, [CVE-2026-21637](https://www.cve.org/CVERecord?id=CVE-2026-21637)
384+
was triaged as a Node.js vulnerability, but scenarios that require TLS
385+
callbacks such as `ALPNCallback`, `SNICallback`, or `pskCallback` to throw
386+
are outside the Node.js threat model. Future reports of similar issues,
387+
where the crash depends on application callbacks throwing uncaught
388+
exceptions, will not be treated as Node.js vulnerabilities. It is the
389+
application's responsibility to handle unexpected callback input and report
390+
errors without throwing uncaught exceptions.
391+
377392
#### Permission Model Boundaries (`--permission`)
378393

379394
The Node.js [Permission Model](https://nodejs.org/api/permissions.html)

0 commit comments

Comments
 (0)