Skip to content

deps: update shell-quote to 1.12.0 - #622

Merged
gustavohenke merged 2 commits into
open-cli-tools:mainfrom
Abicodexi:update-shell-quote
Oct 8, 2026
Merged

gustavohenke merged 2 commits into
open-cli-tools:mainfrom
Abicodexi:update-shell-quote

Conversation

@Abicodexi

@Abicodexi Abicodexi commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #626

Updates shell-quote from 1.9.0 to 1.12.0 and refreshes pnpm-lock.yaml to address CVE-2026-102422.

The vulnerability allows command injection through quote() when a comment token is followed by a string containing a line terminator. Version 1.11.0 fixes this by rejecting line terminators in tokens following a comment.

Validation

  • Ran pnpm test --run
  • Added a test in lib/command-parser/expand-arguments.spec.ts for an argument with both ' and !. It passes with 1.12.0 and fails with 1.9.0. Credit to @Mayvis for the test.

@coveralls

coveralls commented Sep 30, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 98.83%. remained the same — Abicodexi:update-shell-quote into open-cli-tools:main

@Abicodexi Abicodexi changed the title fix(deps): update shell-quote to 1.11.0 deps: update shell-quote to 1.11.0 Sep 30, 2026
@mdumakurtas

Copy link
Copy Markdown

👍

@Abicodexi

Copy link
Copy Markdown
Contributor Author

Upgrading the version to 1.11.0 will suffice to fix the reported vulnerability, but I can bump the version to 1.12.0 and include a test if needed.

@Mayvis

Mayvis commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Hi @Abicodexi, I opened #625 for the same CVE without noticing this PR first, so I'm closing mine in favor of this one.

It included a regression test that also applies to 1.11.0, in case it's useful here: efe9536

It covers a passthrough argument containing both ' and ! (it's great!). That's the only quote() output concurrently can hit that differs from 1.9.0: 1.11.0 returns 'it'"'"'s great!', while 1.9.0 returned "it's great\!", which leaves a stray backslash in sh/bash. The test passes with 1.11.0 and fails with 1.9.0.

There's also #626 tracking the CVE, if you'd like to add Closes #626 to the description.

@Abicodexi

Abicodexi commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @Abicodexi, I opened #625 for the same CVE without noticing this PR first, so I'm closing mine in favor of this one.

It included a regression test that also applies to 1.11.0, in case it's useful here: efe9536

It covers a passthrough argument containing both ' and ! (it's great!). That's the only quote() output concurrently can hit that differs from 1.9.0: 1.11.0 returns 'it'"'"'s great!', while 1.9.0 returned "it's great\!", which leaves a stray backslash in sh/bash. The test passes with 1.11.0 and fails with 1.9.0.

There's also #626 tracking the CVE, if you'd like to add Closes #626 to the description.

Hi @Mayvis, I appreciate that. I can include the regression test here if you don't mind?

@Mayvis

Mayvis commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Not at all, please go ahead! Cherry-picking efe9536 should apply cleanly, since it only touches lib/command-parser/expand-arguments.spec.ts. Thanks for picking it up!

Sebastian Seitalahti and others added 2 commits October 7, 2026 13:59
@Abicodexi Abicodexi changed the title deps: update shell-quote to 1.11.0 deps: update shell-quote to 1.12.0 Oct 7, 2026

@gustavohenke gustavohenke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, folks!

@gustavohenke
gustavohenke merged commit d26574e into open-cli-tools:main Oct 8, 2026
21 checks passed
@MassimilianoLattanzio

Copy link
Copy Markdown

@gustavohenke thanks for merging this. What about releasing a new version of the package? In this way, we can update our dependency as well

@Abicodexi
Abicodexi deleted the update-shell-quote branch October 8, 2026 08:20
gustavohenke pushed a commit that referenced this pull request Oct 8, 2026
Co-authored-by: Sebastian Seitalahti <sebastian.seitalahti@knowit.fi>
Co-authored-by: Mayvis <kevin73911@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@gustavohenke

Copy link
Copy Markdown
Member

Yup, it's published on v10.0.6/v9.2.5! Laptop battery died during merge and I forgot to get back to it 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade shell-quote to >=1.11.0 to fix CVE-2026-102422

6 participants