Skip to content

chore(repo): Update dependency smol-toml@<1.6.1 to v1.9.0 [SECURITY] - #10717

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-smol-toml-1.6.1-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-smol-toml-1.6.1-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
smol-toml@<1.6.1 1.7.1 → 1.9.0 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


smol-toml: Quadratic-time parse() from parseKey rescanning to end of document on each key line

GHSA-r4xh-jqrq-34v2

More information

Details

Summary

parse() has a quadratic-time path in parseKey, reachable on default options with ordinary valid input. For every key line and table-header line, parseKey (dist/struct.js, lines 58 and 86) finds the dotted-key separator with ctx.s.indexOf('.', ctx.p), where ctx.s is the whole document. When a key has no . ahead of it, that search runs all the way to the end of the input, and the result is then clamped back to the line terminator endPtr - so everything scanned past the current line is wasted. parseKey runs once per line, so a document of N dot-free keys costs O(n^2).

The most ordinary TOML shape triggers it: a flat list of key = value lines, or a repeated [[a]] table. No dotted keys, no special options, valid input throughout.

Proof of concept
import { parse } from 'smol-toml'

let doc = ''
for (let i = 0; i < 256000; i++) doc += 'k' + i + ' = 1\n'

console.time('parse')
parse(doc) // ~2.8 MB of valid TOML, default options
console.timeEnd('parse')

Doubling the line count roughly quadruples the time:

lines size parse()
32k 0.3 MB 0.3 s
64k 0.7 MB 1.0 s
128k 1.4 MB 3.5 s
256k 2.8 MB 14 s
Impact

Any service that runs parse() on attacker-supplied TOML can be stalled. The work is synchronous, so it blocks the whole event loop, and the quadratic is unbounded: a ~7 MB body pins a core for about a minute, larger bodies for several.

Patches

Version 1.9.0 uses a different implementation for parsing keys which is strictly linear.

Workarounds

Limit the maximum document size accepted when parsing arbitrary documents.

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Configuration

📅 Schedule: (in timezone GMT)

  • Branch creation
    • At any time (no schedule defined)
  • 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies Pull requests that update a dependency file label Nov 8, 2026
@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Dec 5, 2026 11:46pm UTC
mosaic-docs Ready Ready Preview Dec 5, 2026 11:46pm UTC
swingset Ready Ready Preview Dec 5, 2026 11:46pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0c4109f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.

Run configuration

  • Source mode: Auto
  • Repository: clerk/javascript
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 204be64
  • Layers: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 00d7ce18-5441-42f8-b068-b551a7156fcc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@pkg-pr-new

pkg-pr-new Bot commented Dec 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10717

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10717

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10717

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10717

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10717

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10717

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10717

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10717

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10717

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10717

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10717

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10717

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10717

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10717

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10717

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10717

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10717

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10717

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10717

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10717

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10717

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10717

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10717

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10717

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10717

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10717

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10717

commit: 0c4109f

This branch was successfully deployed

2 active deployments
Preview – swingset — 0c4109fe Deployed Dec 5, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 0c4109fe Deployed Dec 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants