CVE-2022-33987: Got Got Allows A Redirect To Vulnerability

MODERATE
Advisory Identifier: GHSA-pfrx-2q88-qq97
CVSS 5.3
Published
Advisory Summary

CVE-2022-33987 is a MODERATE (CVSS 5.3) got allows a redirect to vulnerability (General Security Weakness) affecting Got libraries in the npm ecosystem. The issue involves got allows a redirect to a unix socket. Remediation is available by upgrading affected packages to version 12.1.0, 11.8.5.

CVE-2022-33987 at a Glance

CVE Identifier CVE-2022-33987
GHSA Identifier GHSA-pfrx-2q88-qq97
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification General Security Weakness
Affected Product Got
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2022-33987

To remediate this vulnerability, upgrade all affected Got dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

got fixed: 12.1.0
npm install got@12.1.0
got fixed: 11.8.5
npm install got@11.8.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls got

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2022-33987, inspect your project dependencies using npm:

npm ls got

Analyze the terminal output to locate any version of Got in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.1.0), your application is affected.

Note: The npm ls got command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Got, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The got package before 11.8.5 and 12.1.0 for Node.js allows a redirect to a UNIX socket.

CVE-2022-33987 Affected Got Versions

2 component(s)
Fixed Versions:
12.1.011.8.5
Product / Package Ecosystem Affected Versions Fixed Version
got
npm
≥ 12.0.0
< 12.1.0
12.1.0
got
npm
< 11.8.5
11.8.5

References

Frequently Asked Questions

What is CVE-2022-33987?
CVE-2022-33987 is a security vulnerability in Got involving Got allows a redirect to a UNIX socket under General Security Weakness.
Which Got versions are affected?
Affected versions include releases prior to 12.1.0, 11.8.5 across affected packages: got.
What version fixes CVE-2022-33987?
Upgrading to 12.1.0, 11.8.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is got affected?
Yes, got is affected in releases prior to 12.1.0, 11.8.5. Upgrade your dependency to 12.1.0, 11.8.5 or later.
What is the CVSS score of CVE-2022-33987?
CVE-2022-33987 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2022-33987?
CVE-2022-33987 is classified under General Security Weakness.
How can I check npm dependencies for CVE-2022-33987?
Run the dependency tree command: 'npm ls got'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pfrx-2q88-qq97",
  "modified" : "2022-07-05T21:24:52Z",
  "published" : "2022-06-19T00:00:21Z",
  "aliases" : [ "CVE-2022-33987" ],
  "summary" : "Got allows a redirect to a UNIX socket",
  "details" : "The got package before 11.8.5 and 12.1.0 for Node.js allows a redirect to a UNIX socket.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "got"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "12.0.0"
      }, {
        "fixed" : "12.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "got"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "11.8.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-33987"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sindresorhus/got/pull/2047"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sindresorhus/got/commit/861ccd9ac2237df762a9e2beed7edd88c60782dc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sindresorhus/got"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sindresorhus/got/compare/v12.0.3...v12.1.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sindresorhus/got/releases/tag/v11.8.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sindresorhus/got/releases/tag/v12.1.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-21T20:05:25Z",
    "nvd_published_at" : "2022-06-18T21:15:00Z"
  }
}