cli-table2 icon indicating copy to clipboard operation
cli-table2 copied to clipboard

Security advisory "Prototype Pollution"

Open sidhuko opened this issue 6 years ago • 10 comments

0.2.0 has a security advisory applicable.

https://nodesecurity.io/advisories/577

sidhuko avatar May 08 '18 16:05 sidhuko

Noticed this as well. It seems lodash has been removed as a dependency from the GitHub version of this package, but that the version number hasn't been incremented since then / no new package has been published?

(https://github.com/jamestalmage/cli-table2/pull/27/files)

If I do npm pack cli-table2 I get a package with lodash included in the dependencies, different from the current master

dogboydog avatar May 08 '18 18:05 dogboydog

And that was back in 2016.....

NorthernMan54 avatar May 08 '18 23:05 NorthernMan54

I made a quick fix for this issue. This is only for version 0.2.0. The unreleased state of the code is not using lodash at all as it seems to me. To fix this for you, you can add a "resolutions" area in your package.json with my fork as long as the pull request is not merged. Sorry for the typos in the branch name, i was in a hurry...

[...]
  "resolutions": {
    "cli-table2": "https://github.com/civilatio/cli-table2.git#protypePolutionFix"
  },
[...]

stanglt avatar May 09 '18 12:05 stanglt

@jamestalmage Should we release a new version to fix this non-exist issue?

thomasyuan avatar May 25 '18 12:05 thomasyuan

as you can see in https://github.com/jamestalmage/cli-table2/issues/43 we have forked the project to https://github.com/cli-table/cli-table3 and have published a new [email protected] release for the current master branch :)

Turbo87 avatar Jun 10 '18 12:06 Turbo87

Nice... if only we can get npm to switch to cli-table3 :)

mkj28 avatar Jun 10 '18 23:06 mkj28

You can for your own with a resolutions block, as i stated above, but for npm itself, all packages have to change their dependencies.

stanglt avatar Jun 11 '18 06:06 stanglt

wasn't aware that npm uses it, but I guess we can send them a PR that updates the dependency

update: https://github.com/npm/npm/pull/20955 😉

Turbo87 avatar Jun 11 '18 06:06 Turbo87

I think the big offender is nsp itself. This isn't even required as a real dependency for me but it gets flagged by the security warning via nsp.

codemonkeyking avatar Jun 19 '18 23:06 codemonkeyking

@codemonkeyking the problem was the old version of lodash. cli-table3 is no longer using it, so there is no issue anymore.

Turbo87 avatar Jun 20 '18 06:06 Turbo87