Skip to content

fix: Upgrade inquirer to remove lodash dependency#11709

Merged
anthonyshew merged 1 commit intomainfrom
fix/turbo-5236-lodash-v2
Feb 7, 2026
Merged

fix: Upgrade inquirer to remove lodash dependency#11709
anthonyshew merged 1 commit intomainfrom
fix/turbo-5236-lodash-v2

Conversation

@anthonyshew
Copy link
Copy Markdown
Contributor

Summary

Replaces inquirer@8.2.7 with @inquirer/prompts@^7.10.1 across create-turbo, @turbo/codemod, @turbo/gen, and @turbo/workspaces to eliminate the lodash@4.17.21 prototype pollution vulnerability (TURBO-5236).

  • Migrated all prompt call sites from the legacy inquirer.prompt() API to individual @inquirer/prompts functions (input, select, checkbox, confirm)
  • Replaced Separator imports to use @inquirer/prompts instead of the old inquirer package
  • Removed unused inquirer-file-tree-selection-prompt from @turbo/codemod
  • Removed @types/inquirer from all packages (types are built into @inquirer/prompts)

Why @inquirer/prompts@7 and not inquirer@12+?

inquirer@12+ is ESM-only. All affected packages use "type": "commonjs". @inquirer/prompts@7.x ships dual CJS/ESM exports, making it a drop-in replacement without requiring a module system migration.

Remaining known issues

node-plop@0.26.3inquirer@^7lodash@4.17.21 (in @turbo/gen): node-plop@0.30+ is ESM-only, so upgrading it requires converting @turbo/gen to ESM. This is a separate, larger effort.

mermaidlangium@3.3.1chevrotain@11.0.3lodash-es@4.17.21 (in docs): mermaid is already at its latest version (11.12.2). The vulnerable lodash-es comes from chevrotain@11.0.3 (pinned by langium@3.3.1 via ~11.0.3). chevrotain@11.1.1 fixes this, but langium hasn't released a version that allows it. This requires an upstream fix in langium/mermaid.

Testing

  • All 4 affected packages pass check-types (tsc --noEmit)
  • All 4 affected packages build successfully (tsdown)
  • All tests pass: create-turbo (22), @turbo/gen (9), @turbo/codemod (217), @turbo/workspaces (909)

@anthonyshew anthonyshew requested a review from a team as a code owner February 7, 2026 04:05
@anthonyshew anthonyshew requested review from tknickman and removed request for a team February 7, 2026 04:05
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Feb 7, 2026

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

Project Deployment Actions Updated (UTC)
examples-basic-web Ready Ready Preview, Comment, Open in v0 Feb 7, 2026 4:05am
examples-designsystem-docs Ready Ready Preview, Comment, Open in v0 Feb 7, 2026 4:05am
examples-gatsby-web Ready Ready Preview, Comment, Open in v0 Feb 7, 2026 4:05am
examples-kitchensink-blog Ready Ready Preview, Comment, Open in v0 Feb 7, 2026 4:05am
examples-nonmonorepo Ready Ready Preview, Comment, Open in v0 Feb 7, 2026 4:05am
examples-svelte-web Ready Ready Preview, Comment, Open in v0 Feb 7, 2026 4:05am
examples-tailwind-web Ready Ready Preview, Comment, Open in v0 Feb 7, 2026 4:05am
examples-vite-web Ready Ready Preview, Comment, Open in v0 Feb 7, 2026 4:05am
turbo-site Ready Ready Preview, Comment, Open in v0 Feb 7, 2026 4:05am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
turborepo-test-coverage Skipped Skipped Open in v0 Feb 7, 2026 4:05am

@anthonyshew anthonyshew merged commit 87970c1 into main Feb 7, 2026
44 checks passed
@anthonyshew anthonyshew deleted the fix/turbo-5236-lodash-v2 branch February 7, 2026 04:16
github-actions Bot added a commit that referenced this pull request Feb 7, 2026
## Release v2.8.3-canary.8

Versioned docs: https://v2-8-3-canary-8.turborepo.dev

### Changes

- fix: Upgrade eslint to v10 to resolve @eslint/plugin-kit ReDoS
vulnerability (#11705) (`fd541f3a59`)
- fix: Upgrade tsdown in create-turbo to resolve valibot ReDoS
vulnerability (#11702) (`e5efb86265`)
- fix: Upgrade fumadocs and shiki in docs to resolve mdast-util-to-hast
vulnerability (#11704) (`c94e2c54ed`)
- fix: Upgrade inquirer to remove lodash dependency (#11709)
(`87970c1fa4`)
- release(turborepo): 2.8.3-canary.7 (#11686) (`d189b9e9e2`)

Co-authored-by: Turbobot <turbobot@vercel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant