Replace undici with headers-polyfill in connect-node#1651
Open
danwsong wants to merge 1 commit intoconnectrpc:v1from
Open
Replace undici with headers-polyfill in connect-node#1651danwsong wants to merge 1 commit intoconnectrpc:v1from
danwsong wants to merge 1 commit intoconnectrpc:v1from
Conversation
Undici v5 is affected by CVE-2026-1526 and CVE-2026-2229 (WebSocket permessage-deflate vulnerabilities). Since connect-node only uses undici for the Headers class polyfill on Node < 18, replace it with the lightweight headers-polyfill package. This avoids bumping engine requirements while eliminating the vulnerability surface entirely. Signed-off-by: Daniel Song <dan.w.song@gmail.com>
Author
|
Hi @timostamm, would you be open to backporting CVE fixes to v1 like this? |
Member
|
Hey @danwsong, thanks for the PR. The CVEs are about the WebSocket client in undici. There is no usage of the WebSocket client in connect-es. I assume the problem is that the dependency is flagged regardless? |
Author
|
@timostamm Yes, precisely. It's true that this library doesn't use undici for the WebSocket client, but it's still getting flagged. I looked at a few options before landing on this:
|
Author
|
@timostamm Are any of these checks of concern? |
Author
|
@timostamm I'd like to follow up on this, would you have any concerns with this change in principle? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Undici v5 is affected by CVE-2026-1526 and CVE-2026-2229 (WebSocket permessage-deflate vulnerabilities). Since connect-node only uses undici for the Headers class polyfill on Node < 18, this replaces it with the lightweight headers-polyfill package. No engine requirement changes — Node >= 16 continues to work.