Repository navigation
[wrangler] Update smol-toml to 1.8.0 - #15662
Merged
Merged
Conversation
The bundled TOML parser behind wrangler.toml was pinned at 1.5.2 in the catalog, behind GHSA-7w5x-hrqm-74c2 (a=[1 # spins forever, fixed 1.7.1) and GHSA-v3rj-xjv7-4jmq (8000 comment lines overflow the stack, fixed 1.6.1). Both reproduce through wrangler deploy --dry-run on main. One workers-utils test pinned the exact 1.5.2 error text for an unterminated string; 1.7.0 reports the real fault (unfinished string, column 7) and the expectation moves with it.
🦋 Changeset detectedLatest commit: 0b4d22e The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
workers-devprod
requested review from
a team and
cjol
and removed request for
a team
September 16, 2026 02:46
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
cjol
approved these changes
Sep 22, 2026
cjol
enabled auto-merge (squash)
September 22, 2026 13:27
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
workers-devprod
approved these changes
Sep 22, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
cjol
disabled auto-merge
September 22, 2026 13:28
dario-piotrowicz
approved these changes
Sep 22, 2026
Member
|
Thanks for the fix @oddharsh 😄 |
Merged
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes: no issue filed; a dependency bump seemed small enough to go straight to a PR per CONTRIBUTING. Happy to open one if you'd rather track it.
smol-tomlis the bundled parser behindwrangler.toml(via@cloudflare/workers-utils'parseTOML), and it is also bundled intocreate-cloudflareand@cloudflare/workers-auth. Thecatalog:defaultentry pins 1.5.2, which is behind two published advisories:a=[1 #) never returns; the parser resets its cursor and spinsBoth reproduce through wrangler itself, measured on the
mainbuild published to pkg.pr.new yesterday (4.131.2 (main)):With 1.8.0 the first fails in 1 ms with
Invalid TOML document: cannot find end of structure, and the second parses.The practical exposure is small, since
wrangler.tomlis almost always the user's own file. What tipped it into a PR is that the root Dependabot block onlyallowsworkerdand@cloudflare/workers-types, so nothing here would ever bump this on its own, and downstream OSV scans keep flagging the bundle (that is how I found it: our repo's scan named wrangler's copy after we had already bumped our own).What changed
pnpm-workspace.yaml:smol-tomlcatalog entry1.5.2to1.8.0, the current release. 1.7.1 is the floor for the high-severity advisory; 1.8.0 adds TOML 1.1 parsing (multiline inline tables,\xescapes) and Temporal support instringify. The one behaviour change worth knowing about is from 1.7.0:stringifyemits integers outside the safe range as floats.pnpm-lock.yaml: only the smol-toml lines. I ranpnpm install --lockfile-only, which also wanted to rewrite the@cloudflare/workers-typespeer suffix on the@flue/viteandagentssnapshot keys (unrelated drift from Bump the workerd-and-workers-types group across 1 directory with 2 updates #15633), so I kept just the smol-toml hunks and confirmedpnpm install --frozen-lockfile --lockfile-onlyaccepts the result.packages/workers-utils/tests/parse.test.ts: one assertion pinned the exact error text forname = 'fail". The 1.7.0 string-decode rewrite reports the real fault,unfinished stringat column 7, where 1.5.2 blamed the key at column 12. Expectation updated..changeset/smol-toml-parser-dos.md: one patch changeset naming the four packages that bundle it.Locally:
pnpm -F @cloudflare/workers-utils test1064/1064 after the one expectation change;pnpm -F wrangler test(the whole unit suite, afterpnpm run build --filter wrangler) 257 files, 5276 passed, 3 skipped, 9 todo, 0 failed.