Skip to content

doc: expand SECURITY.md with non-vulnerability examples#61972

Open
RafaelGSS wants to merge 1 commit intonodejs:mainfrom
RafaelGSS:include-more-examples-threat-model
Open

doc: expand SECURITY.md with non-vulnerability examples#61972
RafaelGSS wants to merge 1 commit intonodejs:mainfrom
RafaelGSS:include-more-examples-threat-model

Conversation

@RafaelGSS
Copy link
Member

As discussed in the triage team, most of the reports we are receiving are using IA to fuzz your codebase, making this explicitly on SECURITY.md might avoid that amount of AI Sloop.

cc: @nodejs/security-triage

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Feb 24, 2026
Comment on lines +414 to +421
#### CRLF Injection in `writeEarlyHints()`

`ServerResponse.writeEarlyHints()` accepts a `link` header value that is set
by the application. Passing arbitrary strings, including CRLF sequences, as
the `link` value is an application-level misuse of the API, not a Node.js
vulnerability. Node.js validates the structure of Early Hints per the HTTP spec
but does not sanitize free-form application data passed to it; that is the
application's responsibility.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one seems a bit specific. I feel like we probably don't need to go down the line of exhaustively listing every received wontfix...

Copy link
Member Author

@RafaelGSS RafaelGSS Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just an attempt to reduce the AI-sloop. If it fixes the problem, we might want to go down that line... in a separate file, possibly more specific to AI.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit disheartening to see since I decided to discuss this very issue with @RafaelGSS first to understand what falls in or out of the node js threat model.

Yes AI was used in the discovery, but there are three points that led to the discussion to seek clarification;

  1. CWE-444 is given as an example vulnerability in this doc
  2. The wording;

if the data passing through Node.js to/from the application can trigger actions other than those documented for the APIs

  1. The paragraph (emphasis mine);

In addition to addressing vulnerabilities based on the above, the project works to avoid APIs and internal implementations that make it "easy" for application code to use the APIs incorrectly in a way that results in vulnerabilities within the application code itself. While we don’t consider those vulnerabilities in Node.js itself and will not necessarily issue a CVE, we do want them to be reported privately to Node.js first. We often choose to work to improve our APIs based on those reports and issue fixes either in regular or security releases depending on how much of a risk to the community they pose.

Despite AI involvement, it presented as an issue that ought to be addressed, if the means of reporting was incorrect, I apologise, I thought I did the right thing, but I do acknowledge that the use of AI in security is only going to exacerbate claims of vulnerabilities.

Lastly, here's the PR to actually try and harden/sanitise from CRLF through writeEarlyHints() to prevent this very footgun #61897. It still holds that's the applications responsibility for those header name/values, but at least there's some mitigation and consistency with other header setting functions.

Rather than specifically calling out CRLF in writeEarlyHints, could this example be updated to demonstrate the differentiator between an applications responsibility and node js, which I read as the intent of this. An issue within JSON.parse might be the responsibility of node js but the resulting value given some remote data is the applications.

@RafaelGSS RafaelGSS added the fast-track PRs that do not need to wait for 72 hours to land. label Feb 25, 2026
@github-actions
Copy link
Contributor

Fast-track has been requested by @RafaelGSS. Please 👍 to approve.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. fast-track PRs that do not need to wait for 72 hours to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants