CVE-2023-7079: Wrangler Arbitrary Remote File Read Vulnerability

MODERATE
Advisory Identifier: GHSA-cfph-4qqh-w828
CVSS 6.9
CWE-287
Published
Advisory Summary

CVE-2023-7079 is a MODERATE (CVSS 6.9) arbitrary remote file read vulnerability (CWE-287: Improper Authentication) affecting Wrangler libraries in the npm ecosystem. The issue involves arbitrary remote file read in wrangler dev server. Remediation is available by upgrading affected packages to version 3.19.0.

CVE-2023-7079 at a Glance

CVE Identifier CVE-2023-7079
GHSA Identifier GHSA-cfph-4qqh-w828
Severity MODERATE
CVSS v3.1 Base Score 6.9
CWE Classification CWE-287: Improper Authentication
Affected Product Wrangler
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.9

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

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

How to Fix CVE-2023-7079

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

wrangler fixed: 3.19.0
npm install wrangler@3.19.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 wrangler

How to Check if You Are Affected

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

npm ls wrangler

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

Note: The npm ls wrangler 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Wrangler, 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

### Impact Sending specially crafted HTTP requests and inspector messages to Wrangler's dev server could result in any file on the user's computer being accessible over the local network. An attacker that could trick any user on the local network into opening a malicious website could also read any file. ### Patches This issue was fixed in `wrangler@3.19.0`. Wrangler will now only serve files that are part of your bundle, or referenced by your bundle's source maps. ### Workarounds Configure Wrangler to listen on local interfaces instead with `wrangler dev --ip 127.0.0.1`. This is the [default as of `wrangler@3.16.0`](https://github.com/cloudflare/workers-sdk/security/advisories/GHSA-f8mp-x433-5wpf), and removes the local network as an attack vector, but does not prevent an attack from visiting a malicious website. ### References - https://github.com/cloudflare/workers-sdk/pull/4532 - https://github.com/cloudflare/workers-sdk/pull/4535

CVE-2023-7079 Affected Wrangler Versions

1 component(s)
Fixed Versions:
3.19.0
Product / Package Ecosystem Affected Versions Fixed Version
wrangler
npm
≥ 3.9.0
< 3.19.0
3.19.0

References

Frequently Asked Questions

What is CVE-2023-7079?
CVE-2023-7079 is a security vulnerability in Wrangler involving Arbitrary remote file read in Wrangler dev server under CWE-287: Improper Authentication.
Which Wrangler versions are affected?
Affected versions include releases prior to 3.19.0 across affected packages: wrangler.
What version fixes CVE-2023-7079?
Upgrading to 3.19.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wrangler affected?
Yes, wrangler is affected in releases prior to 3.19.0. Upgrade your dependency to 3.19.0 or later.
What is the CVSS score of CVE-2023-7079?
CVE-2023-7079 has a CVSS v3.1 base score of 6.9 (MODERATE) with vector string CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2023-7079?
CVE-2023-7079 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for CVE-2023-7079?
Run the dependency tree command: 'npm ls wrangler'. 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-cfph-4qqh-w828",
  "modified" : "2024-01-03T21:24:56Z",
  "published" : "2024-01-03T21:24:56Z",
  "aliases" : [ "CVE-2023-7079" ],
  "summary" : "Arbitrary remote file read in Wrangler dev server",
  "details" : "### Impact\nSending specially crafted HTTP requests and inspector messages to Wrangler's dev server could result in any file on the user's computer being accessible over the local network. An attacker that could trick any user on the local network into opening a malicious website could also read any file.\n\n### Patches\nThis issue was fixed in `wrangler@3.19.0`. Wrangler will now only serve files that are part of your bundle, or referenced by your bundle's source maps.\n\n### Workarounds\nConfigure Wrangler to listen on local interfaces instead with `wrangler dev --ip 127.0.0.1`. This is the [default as of `wrangler@3.16.0`](https://github.com/cloudflare/workers-sdk/security/advisories/GHSA-f8mp-x433-5wpf), and removes the local network as an attack vector, but does not prevent an attack from visiting a malicious website.\n\n### References\n- https://github.com/cloudflare/workers-sdk/pull/4532\n- https://github.com/cloudflare/workers-sdk/pull/4535\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "wrangler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.9.0"
      }, {
        "fixed" : "3.19.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/workers-sdk/security/advisories/GHSA-cfph-4qqh-w828"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-7079"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/workers-sdk/pull/4532"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/workers-sdk/pull/4535"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/workers-sdk/commit/29df8e17545bf3926b6d61678b596be809d40c6d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/workers-sdk/commit/311ffbd5064f8301ac6f0311bbe5630897923b93"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cloudflare/workers-sdk"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-03T21:24:56Z",
    "nvd_published_at" : "2023-12-29T12:15:47Z"
  }
}