Skip to content

Commit efe4b44

Browse files
committed
doc: clarify callback exceptions
Signed-off-by: Matteo Collina <hello@matteocollina.com>
1 parent 65ffd02 commit efe4b44

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)