Fix bug in 16-bit frame length when buffer is a subarray by jawj · Pull Request #2106 · nodejs/undici (original) (raw)

added 2 commits

May 2, 2023 18:40

@jawj

I was just bitten by this issue. Because buffer could be a subarray, the byteOffset and byteLength arguments to new DataView() are required, otherwise the length value may be written at the wrong offset.

Alternatively, it looks like it would be simpler (and it also works) to replace the patched line with buffer.writeUInt16BE(bodyLength, 2).

@jawj

Fixed bug in 16-bit frame length when buffer is a subarray

mcollina

KhafraDev

@jawj

…of DataView.setUint16, and added a test for the fix

mcollina

kodiakhq Bot referenced this pull request in ascorbic/unpic-img

May 14, 2023

@renovate

This was referenced

Jun 1, 2023

@jawj jawj mentioned this pull request

Jun 2, 2023

Kikobeats added a commit to vercel/vercel that referenced this pull request

Jun 20, 2023

@Kikobeats @EndangeredMassa

We avoided to use undici.WebSocket because @jawj found a bug in the implementation.

The fix was merged in undici@5.22.1, so we can be back to use it.

The latest version of Edge Runtime exposes undici.WebSocket compatible with node.js 14, 16 & 18


Co-authored-by: Sean Massa endangeredmassa@gmail.com

metcoder95 pushed a commit to metcoder95/undici that referenced this pull request

Jul 21, 2023

@jawj @metcoder95

kodiakhq Bot referenced this pull request in X-oss-byte/Canary-nextjs

Oct 1, 2023

@renovate

kodiakhq Bot referenced this pull request in X-oss-byte/Nextjs

Oct 6, 2023

@renovate

louis-bompart referenced this pull request in coveo/cli

Jan 16, 2024

@renovate @developer-experience-bot

…#1402)

Mend
Renovate](https://renovatebot.com)

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
undici
(source) [5.22.0 ->
5.26.2](https://renovatebot.com/diffs/npm/undici/5.22.0/5.26.2)
age](https://docs.renovatebot.com/merge-confidence/)
adoption](https://docs.renovatebot.com/merge-confidence/)
passing](https://docs.renovatebot.com/merge-confidence/)
confidence](https://docs.renovatebot.com/merge-confidence/)

GitHub Vulnerability Alerts

CVE-2023-45143

Impact

Undici clears Authorization headers on cross-origin redirects, but does not clear Cookie headers. By design, cookie headers are forbidden request headers, disallowing them to be set in RequestInit.headers in browser environments. Since Undici handles headers more liberally than the specification, there was a disconnect from the assumptions the spec made, and Undici's implementation of fetch.

As such this may lead to accidental leakage of cookie to a 3rd-party site or a malicious attacker who can control the redirection target (ie. an open redirector) to leak the cookie to the 3rd party site.

Patches

This was patched in e041de359221ebeae04c469e8aff4145764e6d76, which is included in version 5.26.2.


Release Notes

nodejs/undici (undici)

v5.26.2

Compare Source

Security Release, CVE-2023-45143.

v5.26.1

Compare Source

What's Changed

Full Changelog: nodejs/undici@v5.26.0...v5.26.1

v5.26.0

Compare Source

What's Changed

New Contributors

Full Changelog: nodejs/undici@v5.23.4...v5.26.0

v5.25.4

Compare Source

v5.25.3

Compare Source

What's Changed

New Contributors

Full Changelog: nodejs/undici@v5.25.2...v5.25.3

v5.25.2

Compare Source

What's Changed

New Contributors

Full Changelog: nodejs/undici@v5.25.1...v5.25.2

v5.25.1

Compare Source

What's Changed

Full Changelog: nodejs/undici@v5.25.0...v5.25.1

v5.25.0

Compare Source

What's Changed

New Contributors

Full Changelog: nodejs/undici@v5.24.0...v5.25.0

v5.24.0

Compare Source

Notable Changes

What's Changed

New Contributors

Full Changelog: nodejs/undici@v5.23.0...v5.24.0

v5.23.0

Compare Source

What's Changed

@​ronag in https://github.com/nodejs/undici/pull/2121

New Contributors

Full Changelog: nodejs/undici@v5.22.1...v5.23.0

v5.22.1

Compare Source

What's Changed

New Contributors

Full Changelog: nodejs/undici@v5.22.0...v5.22.1


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.


Co-authored-by: developer-experience-bot[bot] <91079284+developer-experience-bot[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

crysmags pushed a commit to crysmags/undici that referenced this pull request

Feb 27, 2024

@jawj @crysmags

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

[ Show hidden characters]({{ revealButtonHref }})