Skip to content

CVE-2022-0235 - node-fetch (peer dependency via isomorphic-fetch) #213

@nathanlodge

Description

@nathanlodge

CVE-2022-0235

Versions of the node-fetch package lower than 2.6.7 are potentially vulnerable to exposure of sensitive information to an unauthorized actor (see GHSA-r683-j2x4-v87g)

The node-fetch package is a peer dependency of the Avatax-REST-V2-JS-SDK package via the isomorphic-fetch package:

"isomorphic-fetch": "^2.2.1"

isomorphic-fetch:
version "2.2.1"
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
dependencies:
node-fetch "^1.0.1"
whatwg-fetch ">=0.10.0"

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ node-fetch is vulnerable to Exposure of Sensitive            │
│               │ Information to an Unauthorized Actor                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ node-fetch                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=2.6.7                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ isomorphic-fetch                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ isomorphic-fetch > node-fetch                                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1006899                     │
└───────────────┴──────────────────────────────────────────────────────────────┘

Overriding node-fetch to a safe version is not currently an option

Testing with node-fetch version 2.6.7, the following TypeError is encountered TypeError: Cannot read properties of undefined (reading 'content-type') handling responses here:

var contentType = res.headers._headers['content-type'];
var contentLength = res.headers._headers['content-length'];

Would it be possible to prioritize a fix for this vulnerability?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions