CVE-2023-28155: Request Server-Side Request Forgery Vulnerability

MODERATE
Advisory Identifier: GHSA-p8p7-x288-28g6
CVSS 6.1
CWE-918
Published
Advisory Summary

CVE-2023-28155 is a MODERATE (CVSS 6.1) server-side request forgery vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Request libraries in the npm ecosystem. The issue involves server-side request forgery in request. Remediation is available by upgrading affected packages to version 3.0.0.

CVE-2023-28155 at a Glance

CVE Identifier CVE-2023-28155
GHSA Identifier GHSA-p8p7-x288-28g6
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Request
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

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:R/S:C/C:L/I:L/A:N).

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

How to Fix CVE-2023-28155

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

request fixed: Latest secure release
npm install request@Latest secure release
@cypress/request fixed: 3.0.0
npm install @cypress/request@3.0.0
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 request

How to Check if You Are Affected

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

npm ls request

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

Note: The npm ls request 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 CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Request, 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 `request` package through 2.88.2 for Node.js and the `@cypress/request` package prior to 3.0.0 allow a bypass of SSRF mitigations via an attacker-controller server that does a cross-protocol redirect (HTTP to HTTPS, or HTTPS to HTTP). NOTE: The `request` package is no longer supported by the maintainer.

CVE-2023-28155 Affected Request Versions

2 component(s)
Fixed Versions:
3.0.0
Product / Package Ecosystem Affected Versions Fixed Version
request
npm
≤ 2.88.2
@cypress/request
npm
< 3.0.0
3.0.0

References

Frequently Asked Questions

What is CVE-2023-28155?
CVE-2023-28155 is a security vulnerability in Request involving Server-Side Request Forgery in Request under CWE-918: Server-Side Request Forgery (SSRF).
Which Request versions are affected?
Affected versions include releases prior to 3.0.0 across affected packages: request, @cypress/request.
What version fixes CVE-2023-28155?
Upgrading to 3.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is request affected?
Yes, request is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is @cypress/request affected?
Yes, @cypress/request is affected in releases prior to 3.0.0. Upgrade your dependency to 3.0.0 or later.
What is the CVSS score of CVE-2023-28155?
CVE-2023-28155 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2023-28155?
CVE-2023-28155 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check npm dependencies for CVE-2023-28155?
Run the dependency tree command: 'npm ls request'. 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-p8p7-x288-28g6",
  "modified" : "2024-03-21T17:47:20Z",
  "published" : "2023-03-16T15:30:19Z",
  "aliases" : [ "CVE-2023-28155" ],
  "summary" : "Server-Side Request Forgery in Request",
  "details" : "The `request` package through 2.88.2 for Node.js and the `@cypress/request` package prior to 3.0.0 allow a bypass of SSRF mitigations via an attacker-controller server that does a cross-protocol redirect (HTTP to HTTPS, or HTTPS to HTTP).\n\nNOTE: The `request` package is no longer supported by the maintainer.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "request"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.88.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@cypress/request"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.88.12"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-28155"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/request/request/issues/3442"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cypress-io/request/pull/28"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/advisory-database/pull/2500"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/request/request/pull/3444"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cypress-io/request/commit/c5bcf21d40fb61feaff21a0e5a2b3934a440024f"
  }, {
    "type" : "WEB",
    "url" : "https://doyensec.com/resources/Doyensec_Advisory_RequestSSRF_Q12023.pdf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cypress-io/request/blob/master/lib/redirect.js#L116"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cypress-io/request/releases/tag/v3.0.0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/request/request"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/request/request/blob/master/lib/redirect.js#L111"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20230413-0007"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-16T18:33:48Z",
    "nvd_published_at" : "2023-03-16T15:15:00Z"
  }
}