Skip to content

Replace multimatch with minimatch@11 to resolve GHSA-g3hv-75wg-m249 - #1469

Merged
sanex3339 merged 2 commits into
javascript-obfuscator:masterfrom
jeremy-morren:fix/minimatch-redos
Nov 4, 2026
Merged

sanex3339 merged 2 commits into
javascript-obfuscator:masterfrom
jeremy-morren:fix/minimatch-redos

Conversation

@jeremy-morren

Copy link
Copy Markdown
Contributor

multimatch@5.0.0 pulls in minimatch@3, which is vulnerable to GHSA-g3hv-75wg-m249 (fixed only in 11.0.1). Bumping multimatch doesn't help: 6+ is ESM-only (#1340) and 8.0.0 still uses minimatch@10. A resolutions entry doesn't help either, because consumers ignore it.

  • --exclude now uses minimatch directly. Patterns still apply in order with ! negation, and \ still works as a separator on Windows.
  • Added tests for negated and non-globstar patterns.
  • Removed the obsolete brace-expansion resolution.
  • engines.node is now >=20: minimatch 11 needs Node 20, Node 18 is EOL, and CI already tests only 20, 22 and 24.

The risk is low (it needs a malicious --exclude pattern), but this clears the audit warning for downstream users.

Fixes #1468.

jeremy-morren and others added 2 commits November 2, 2026 11:40
…m249`

`multimatch@5.0.0` depends on `minimatch@^3`, and every `minimatch` below
11.0.1 is affected by GHSA-g3hv-75wg-m249. Newer `multimatch` versions are
ESM-only and still use a vulnerable `minimatch`, so the CLI `--exclude`
option now uses `minimatch` directly, keeping multimatch's ordered
`!`-negation semantics and its Windows `\` separator handling.

`minimatch@11` requires Node.js 20, so `engines.node` is now `>=20.0.0`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread CHANGELOG.md
Comment on lines +3 to +6
v5.10.0
---
* Replaced `multimatch` with `minimatch@11` for the CLI `--exclude` option, resolving the `minimatch` denial of service advisory `GHSA-g3hv-75wg-m249`
* Require Node.js 20 or newer, as `minimatch@11` does

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.

Technically it's a breaking change, but Node 20 is already EOL'ed + it fixes a scanner issue, so it is done as a minor version

@sanex3339

Copy link
Copy Markdown
Member

@jeremy-morren thank you

@sanex3339
sanex3339 merged commit 28cd8f7 into javascript-obfuscator:master Nov 4, 2026
7 checks passed
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.

npm audit: minimatch < 11.0.1 (GHSA-g3hv-75wg-m249) via multimatch@5.0.0: fix needs Node 20

2 participants