Security mailing lists by PureSourceCode

GHSA-4qqc-mp5f-ccv4

CRITICAL

Command Injection in bestzip

Versions of bestzip prior to 2.1.7 are vulnerable to Command Injection. The package fails to sanitize input rules and passes it directly to an exec call on the zip function . This may allow attackers to execute arbitrary code in the system as long as the values of destination is user-controlled. This only affects users with a native zip command available. The following examples demonstrate the issue from the CLI and also programatically:

  • bestzip test.zip 'sourcefile; mkdir folder'
  • zip({ source: 'sourcefile', destination: './test.zip; mkdir folder' })
Published
2 Sep 2020
Last modified
2 Sep 2020
Weakness
CWE-77
Sources
OSVJSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV npm bestzip < 2.1.7 2.1.7

References

History

  • 25 Nov 2026 20:10 UTC · OSV: first stored (published 2 Sep 2020)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.