Public bug reported:

The following ESM package versions contain a redirect-handling
regression:

  - Bionic: 1.2.4-1ubuntu0.18.04.1~esm1
  - Focal: 1.2.4-1ubuntu0.20.04.1~esm1

URL conversion can leave redirectUrlParts.host undefined, which is
subsequently dereferenced by isSameOrSubdomain(). On Focal, ordinary
redirects can therefore fail with:

TypeError: Cannot read property 'length' of undefined

Bionic contains the same faulty code, although its default Node.js 8
runtime normally masks the problem. However, the functional mistake is
there.

This issue was introduced by the backports of CVE-2023-26159 in the
mentioned versions. The CVE patch remains correct from security
standpoint, however introduces this functional regression.

Suggested fix: Preserve the parsed redirect URL’s host before converting
it to Node.js request options, and use that preserved value for the
isSameOrSubdomain() comparison. This avoids dereferencing an undefined
host while retaining the intended confidential-header filtering across
hosts, ports, and schemes.

** Affects: node-follow-redirects (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2163354

Title:
  node-follow-redirects crashes when processing redirects in Bionic &
  Focal ESM releases

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/node-follow-redirects/+bug/2163354/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to