Skip to content

@codspeed/benchmark.js-plugin dist inlines an outdated lodash #128

Backlog

Description

@taxor03

Hi, @codspeed/benchmark.js-plugin@6.1.1 (current latest) inlines the full lodash 4.17.21 into both builds, dist/index.cjs.js (main) and dist/index.es5.js (module). The plugin's Rollup config marks only @codspeed/core as external, so resolve() bundles the lodash@4.17.21 that pnpm-lock.yaml on main resolves. The 7.0.0-beta.1 prerelease has the same copy.

lodash 4.17.21 is covered by two published advisories (list below), fixed in 4.18.0. The package declares lodash ^4.17.10, so an install resolves a fixed lodash and npm audit and SCA tools report nothing, while the code that runs is the inlined 4.17.21. We did not find an exploit path through the plugin, so this is not urgent, but nothing will flag this copy for users. (This is the same pattern as #114, about the axios, follow-redirects and form-data copies in @codspeed/core; #115 fixed those and did not touch this plugin.)

Suggested fix: add lodash to external in packages/benchmark.js-plugin/rollup.config.mjs, since it is already a declared dependency, or refresh the lockfile to lodash 4.18.1. Then rebuild and publish.

Static reproduction (2026-11-25):

  1. npm pack @codspeed/benchmark.js-plugin@6.1.1 && tar xzf codspeed-benchmark.js-plugin-6.1.1.tgz
  2. grep -c "VERSION = '4.17.21'" package/dist/index.cjs.js package/dist/index.es5.js → 1, 1
  3. grep -c 'Invalid importsoption passed into_.template' package/dist/index.cjs.js package/dist/index.es5.js → 0, 0 (check added in lodash 4.18.0)
Advisories

lodash 4.17.21:

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions