This repository was archived by the owner on Aug 22, 2024. It is now read-only.
Update dependency wrangler to v2.20.2 [SECURITY] #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.13.0->2.20.2GitHub Vulnerability Alerts
CVE-2023-3348
Impact
The Wrangler command line tool (<=wrangler@3.1.0 or <=wrangler@2.20.1) was affected by a directory traversal vulnerability when running a local development server for Pages (wrangler pages dev command). This vulnerability enabled an attacker in the same network as the victim to connect to the local development server and access the victim's files present outside of the directory for the development server.
Patches
Wrangler2: Upgrade to v2.20.1 or higher.
Wrangler3: Upgrade to v3.1.1 or higher.
References
Workers SDK on Github
Wrangler docs
CVE-2023-3348
CVE-2023-7080
Impact
The V8 inspector intentionally allows arbitrary code execution within the Workers sandbox for debugging.
wrangler devwould previously start an inspector server listening on all network interfaces. This would allow an attacker on the local network to connect to the inspector and run arbitrary code. Additionally, the inspector server did not validateOrigin/Hostheaders, granting an attacker that can trick any user on the local network into opening a malicious website the ability to run code. Ifwrangler dev --remotewas being used, an attacker could access production resources if they were bound to the worker.Patches
This issue was fixed in
wrangler@3.19.0andwrangler@2.20.2. Whilstwrangler dev's inspector server listens on local interfaces by default as ofwrangler@3.16.0, an SSRF vulnerability inminiflareallowed access from the local network untilwrangler@3.18.0.wrangler@3.19.0andwrangler@2.20.2introduced validation for theOrigin/Hostheaders.Workarounds
Unfortunately, Wrangler doesn't provide any configuration for which host that inspector server should listen on. Please upgrade to at least
wrangler@3.16.0, and configure Wrangler to listen on local interfaces instead withwrangler dev --ip 127.0.0.1to prevent SSRF. This removes the local network as an attack vector, but does not prevent an attack from visiting a malicious website.References
Release Notes
cloudflare/workers-sdk (wrangler)
v2.20.2Compare Source
Patch Changes
#4609
c228c912Thanks @mrbbot! - fix: pinworkerdto1.20230404.0#4587
49a46960Thanks @mrbbot! - Change dev registry and inspector server to listen on 127.0.0.1 instead of all interfaces#4587
49a46960Thanks @mrbbot! - fix: validateHostandOrginheaders where appropriateHostandOriginheaders are now checked when connecting to the inspector proxy. If these don't match what's expected, the request will fail.v2.20.1Compare Source
Patch Changes
546c2319Thanks @GregBrimble! - fix: Preventwrangler pages devfrom serving asset files outside of the build output directoryv2.20.0Compare Source
Minor Changes
e351afcfThanks @GregBrimble! - feat: Add support for the undocumented_worker.js/directory in Pages#3095
133c0423Thanks @zebp! - feat: add support for placement in wrangler configAllows a
placementobject in the wrangler config with a mode ofofforsmartto configure Smart placement. Enabling Smart Placement can be done in yourwrangler.tomllike:#3140
5fd080c8Thanks @penalosa! - feat: Support sourcemaps in DevToolsIntercept requests from DevTools in Wrangler to inject sourcemaps and enable folders in the Sources Panel of DevTools. When errors are thrown in your Worker, DevTools should now show your source file in the Sources panel, rather than Wrangler's bundled output.
Patch Changes
#2912
5079f476Thanks @petebacondarwin! - fix: do not render "value of stdout.lastframe() is undefined" if the output is an empty stringFixes #2907
d0788008Thanks @dario-piotrowicz! - fix pages building not taking into account the nodejs_compat flag (and improve the related error message)5b234cfdThanks @jspspike! - Added output for tail being in "sampling mode"v2.19.0Compare Source
Minor Changes
c32f514cThanks @edevil! - Added initial commands for integrating with Constellation AI.v2.18.0Compare Source
Minor Changes
#3098
8818f551Thanks @mrbbot! - fix: improve Workers Sites asset upload reliabilityToo many bulk operations already in progresserror.WRANGLER_LOG=debugenvironment variable. A splash of colour has also been added.v2.17.0Compare Source
Minor Changes
#3004
6d5000a7Thanks @rozenmd! - feat: teachwrangler docsto use algolia search indexThis PR lets you search Cloudflare's entire docs via
wrangler docs [search term here].By default, if the search fails to find what you're looking for, you'll get an error like this:
If you provide the
--yesor-yflag, wrangler will open the docs to https://developers.cloudflare.com/workers/wrangler/commands/, even if the search fails.v2.16.0Compare Source
Minor Changes
#3058
1bd50f56Thanks @mrbbot! - chore: upgrademiniflare@3to3.0.0-next.13Notably, this adds native support for Windows to
wrangler dev --experimental-local, logging for incoming requests, and support for a bunch of newer R2 features.Patch Changes
#3058
1bd50f56Thanks @mrbbot! - fix: disable persistence without--persistin--experimental-localThis ensures
--experimental-localdoesn't persist data on the file-system, unless the--persistflag is set.Data is still always persisted between reloads.
#3055
5f48c405Thanks @rozenmd! - fix: Teach D1 commands to read auth configuration from wrangler.tomlThis PR fixes a bug in how D1 handles a user's accounts. We've updated the D1 commands to read from config (typically via wrangler.toml) before trying to run commands. This means if an
account_idis defined in config, we'll use that instead of erroring out when there are multiple accounts to pick from.Fixes #3046
#3058
1bd50f56Thanks @mrbbot! - fix: disable route validation when using--experimental-localThis ensures
wrangler dev --experimental-localdoesn't require a login or an internet connection if arouteis configured.v2.15.1Compare Source
Patch Changes
4c55baf9Thanks @GregBrimble! - feat: Add**/*.wasm?moduleas default module rule (alias of**/*.wasm)86e942bbThanks @GregBrimble! - fix: Durable Object proxying websockets over local dev registryv2.15.0Compare Source
Minor Changes
#2769
0a779904Thanks @penalosa! - feature: Support modules with--no-bundleWhen the
--no-bundleflag is set, Wrangler now has support for uploading additional modules alongside the entrypoint. This will allow modules to be imported at runtime on Cloudflare's Edge. This respects Wrangler's module rules configuration, which means that only imports of non-JS modules will trigger an upload by default. For instance, the following code will now work with--no-bundle(assuming theexample.wasmfile exists at the correct path):For JS modules, it's necessary to specify an additional module rule (or rules) in your
wrangler.tomlto configure your modules as ES modules or Common JS modules. For instance, to upload additional JavaScript files as ES modules, add the following module rule to yourwrangler.toml, which tells Wrangler that all**/*.jsfiles are ES modules.If you have Common JS modules, you'd configure Wrangler with a CommonJS rule (the following rule tells Wrangler that all
.cjsfiles are Common JS modules):In most projects, adding a single rule will be sufficient. However, for advanced usecases where you're mixing ES modules and Common JS modules, you'll need to use multiple rule definitions. For instance, the following set of rules will match all
.mjsfiles as ES modules, all.cjsfiles as Common JS modules, and thenested/say-hello.jsfile as Common JS.If multiple rules overlap, Wrangler will log a warning about the duplicate rules, and will discard additional rules that matches a module. For example, the following rule configuration classifies
dep.jsas both a Common JS module and an ES module:Wrangler will treat
dep.jsas a Common JS module, since that was the first rule that matched, and will log the following warning:This also adds a new configuration option to
wrangler.toml:base_dir. Defaulting to the directory of your Worker's main entrypoint, this tells Wrangler where your additional modules are located, and determines the module paths against which your module rule globs are matched.For instance, given the following directory structure:
If your
wrangler.tomlhadmain = "src/js/index.js", you would need to setbase_dir = "src"in order to be able to importsrc/vendor/dependency.jsandsrc/index.htmlfromsrc/js/index.js.Patch Changes
#2957
084b2c58Thanks @esimons! - fix: Respect querystring params when calling.fetchon a worker instantiated withunstable_devPreviously, querystring params would be stripped, causing issues for test cases that depended on them. For example, given the following worker script:
would fail the following test case:
#2840
e311bbbfThanks @mrbbot! - fix: makeWRANGLER_LOGcase-insensitive, warn on unexpected values, and fallback tologif invalidPreviously, levels set via the
WRANGLER_LOGenvironment-variable were case-sensitive.If an unexpected level was set, Wrangler would fallback to
none, hiding all logs.The fallback has now been switched to
log, and lenient case-insensitive matching is used when setting the level.eebad0d9Thanks @kuba-orlik! - fix: allow programmatic dev workers to be stopped and started in a single session3f7a75ccThanks @JacobMGEvans! - Fix: Generate Remote URLPrevious URL was pointing to the old cloudflare/templates repo,
updated the URL to point to templates in the workers-sdk monorepo.
v2.14.0Compare Source
Minor Changes
dc1465eaThanks @mrbbot! - chore: upgrademiniflareto2.13.0#2914
9af1a640Thanks @edevil! - feat: add support for send email bindingsSupport send email bindings in order to send emails from a worker. There
are three types of bindings:
does not need to be specified when sending the email but also needs to be a
verified destination address).
addresses.
Patch Changes
#2931
5f6c4c0cThanks @Skye-31! - Fix: Pages Dev incorrectly allowing people to turn off local modeLocal mode is not currently supported in Pages Dev, and errors when people attempt to use it. Previously, wrangler hid the "toggle local mode" button when using Pages dev, but this got broken somewhere along the line.
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.