Review argparse dependency bringing in sprintf-js CVE-2026-97058

Open
#8,749 0 comments 0 reactions 1 assignee View on GitHub

@Varun-S10 is already working on this.

Since Oct 19, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active

Research direction

Start by checking which package.json in the tfjs monorepo declares argparse and whether it is a runtime dependency, using npm ls argparse sprintf-js to confirm the chain. Then review the argparse@^1.0.10 range and any newer compatible release that drops sprintf-js. Done means a documented maintainer decision on removing, making optional, or upgrading the dependency, not a code patch. Expect the discussion to need maintainer input.

Written by the indexing model from the issue text.

Description

type:others

TensorFlow.js 4.22.0 declares argparse@^1.0.10, which resolves to [email protected] and brings in [email protected]:

@tensorflow/[email protected] → [email protected] → [email protected]

sprintf-js versions through 1.1.3 are listed as affected by CVE-2026-97058. The upstream report is being discussed in sprintf-js issue #237.

We see this dependency chain in applications consuming TensorFlow.js. We are not asserting that TFJS exposes the vulnerable formatter to untrusted input in our usage. Could you assess whether argparse is required in this package’s runtime dependency set, and whether it can be removed, made optional, or updated to a compatible release that no longer depends on sprintf-js?

We prefer not to force an argparse major-version override in consuming applications without compatibility guidance. Please advise whether an upstream dependency change is planned.

Dominant language
TypeScript
Stars
19.2k
Forks
2k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tensorflow/tfjs

All issues in tensorflow/tfjs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.