Arbitrary remote file read in Wrangler dev server

Description

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 [email protected]. 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 [email protected], 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

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2024-01-03 21:24:56 UTC
Updated
2024-01-03 21:24:57 UTC
GitHub reviewed
2024-01-03 21:24:56 UTC
NVD published
2023-12-29

EPSS Score

Score Percentile
0.07% 21.52%

CVSS Scores

Base score Version Severity Vector
6.9 3.1
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N Click to expand
Attack vector (AV:A)
Attacker has to be nearby on the network—same office, same link, that vibe—not the whole wide internet.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.

Identifiers

CWEs

CWE id Name
CWE-287 Improper Authentication

Credits

  • Lekensteyn (reporter)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm wrangler >= 3.9.0, < 3.19.0 3.19.0

References

cvelogic Threat Intelligence