CVE-2022-22984 (JSON, published 2022-11-30T13:15Z)
Description: value: The package snyk before 1.1064.0; the package snyk-mvn-plugin before 2.31.3; the package snyk-gradle-plugin before 3.24.5; the package @snyk/snyk-cocoapods-plugin before 2.5.3; the package snyk-sbt-plugin before 2.16.2; the package snyk-python-plugin before 1.24.2; the package snyk-docker-plugin before 5.6.5; the package @snyk/snyk-hex-plugin before 1.1.6 are vulnerable to Command Injection due to an incomplete fix for [CVE-2022-40764](https://security.snyk.io/vuln/SNYK-JS-SNYK-3037342). A successful exploit allows attackers to run arbitrary commands on the host system where the Snyk CLI is installed by passing in crafted command line flags. In order to exploit this vulnerability, a user would have to execute the snyk test command on untrusted files. In most cases, an attacker positioned to control the command line arguments to the Snyk CLI would already be positioned to execute arbitrary commands. However, this could be abused in specific scenarios, such as continuous integration pipelines, where developers can control the arguments passed to the Snyk CLI to leverage this component as part of a wider attack against an integration/build pipeline. This issue has been addressed in the latest Snyk Docker images available at https://hub.docker.com/r/snyk/snyk as of 2022-11-29. Images downloaded and built prior to that date should be updated. The issue has also been addressed in the Snyk TeamCity CI/CD plugin as of version v20221130.093605.
Severity: nan (CVSS v3 base score: 6.3)
Weakness: CWE-78 \u2014 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
Repository: https://github.com/snyk/cli
Files changed:
package-lock.json
package.json
Commit message: fix: escape child process arguments


Vulnerable code:
        "@snyk/snyk-cocoapods-plugin": "2.5.2",
        "@snyk/snyk-hex-plugin": "1.1.4",
        "snyk-docker-plugin": "^5.6.4",
        "snyk-mvn-plugin": "2.31.2",
        "snyk-python-plugin": "1.24.1",
        "snyk-sbt-plugin": "2.16.1",
      "version": "2.5.2",
      "resolved": "https://registry.npmjs.org/@snyk/snyk-cocoapods-plugin/-/snyk-cocoapods-plugin-2.5.2.tgz",
      "integrity": "sha512-WHhnwyoGOhjFOjBXqUfszD84SErrtjHjium/4xFbqKpEE+yuwxs8OwV/S29BtxhYiGtjpD1azv5QtH30VUMl0A==",
      "version": "1.1.4",
      "resolved": "https://registry.npmjs.org/@snyk/snyk-hex-plugin/-/snyk-hex-plugin-1.1.4.tgz",
      "integrity": "sha512-kLfFGckSmyKe667UGPyWzR/H7/Trkt4fD8O/ktElOx1zWgmivpLm0Symb4RCfEmz9irWv+N6zIKRrfSNdytcPQ==",
      "version": "5.6.4",
      "resolved": "https://registry.npmjs.org/snyk-docker-plugin/-/snyk-docker-plugin-5.6.4.tgz",
      "integrity": "sha512-cdzJT747CN66TkU+3zBlJ3V7X1X404YB3TYnJTvxg4DL/0kZ9LvVpZ2AXWlGtd/lcr91gO/O//dAsl4tJwKUFg==",
      "version": "2.31.2",
      "resolved": "https://registry.npmjs.org/snyk-mvn-plugin/-/snyk-mvn-plugin-2.31.2.tgz",
      "integrity": "sha512-/yqn40AYWxI4UKTEpDTa1xRi3NcSSjfEMzoD0Jlc0qI/z+mRMjRsJjxske38LLOcDeUsoPfSQNv97DUpMedDgA==",
      "version": "1.24.1",
      "resolved": "https://registry.npmjs.org/snyk-python-plugin/-/snyk-python-plugin-1.24.1.tgz",
      "integrity": "sha512-u52RAf9T20NsiDLZ798whQLQ/2lWZdDRRFT2GYqyl7oLr5yUD2+SG14d7Phy+ca4Vn7vwKbIQpxXwtUlbRKmVw==",
      "version": "2.16.1",
      "resolved": "https://registry.npmjs.org/snyk-sbt-plugin/-/snyk-sbt-plugin-2.16.1.tgz",
      "integrity": "sha512-SUgPMLmHYa76iwM875tP/8K/10gzZfTPUEJsCkI0bA8TQPimiFDqyrB1mhNLo2NPV8YnqIHwFZgx56ibwywPKQ==",
      "version": "2.5.2",
      "resolved": "https://registry.npmjs.org/@snyk/snyk-cocoapods-plugin/-/snyk-cocoapods-plugin-2.5.2.tgz",
      "integrity": "sha512-WHhnwyoGOhjFOjBXqUfszD84SErrtjHjium/4xFbqKpEE+yuwxs8OwV/S29BtxhYiGtjpD1azv5QtH30VUMl0A==",
      "version": "1.1.4",
      "resolved": "https://registry.npmjs.org/@snyk/snyk-hex-plugin/-/snyk-hex-plugin-1.1.4.tgz",
      "integrity": "sha512-kLfFGckSmyKe667UGPyWzR/H7/Trkt4fD8O/ktElOx1zWgmivpLm0Symb4RCfEmz9irWv+N6zIKRrfSNdytcPQ==",
      "version": "5.6.4",
      "resolved": "https://registry.npmjs.org/snyk-docker-plugin/-/snyk-docker-plugin-5.6.4.tgz",
      "integrity": "sha512-cdzJT747CN66TkU+3zBlJ3V7X1X404YB3TYnJTvxg4DL/0kZ9LvVpZ2AXWlGtd/lcr91gO/O//dAsl4tJwKUFg==",
      "version": "2.31.2",
      "resolved": "https://registry.npmjs.org/snyk-mvn-plugin/-/snyk-mvn-plugin-2.31.2.tgz",
      "integrity": "sha512-/yqn40AYWxI4UKTEpDTa1xRi3NcSSjfEMzoD0Jlc0qI/z+mRMjRsJjxske38LLOcDeUsoPfSQNv97DUpMedDgA==",
      "version": "1.24.1",
      "resolved": "https://registry.npmjs.org/snyk-python-plugin/-/snyk-python-plugin-1.24.1.tgz",
      "integrity": "sha512-u52RAf9T20NsiDLZ798whQLQ/2lWZdDRRFT2GYqyl7oLr5yUD2+SG14d7Phy+ca4Vn7vwKbIQpxXwtUlbRKmVw==",
      "version": "2.16.1",
      "resolved": "https://registry.npmjs.org/snyk-sbt-plugin/-/snyk-sbt-plugin-2.16.1.tgz",
      "integrity": "sha512-SUgPMLmHYa76iwM875tP/8K/10gzZfTPUEJsCkI0bA8TQPimiFDqyrB1mhNLo2NPV8YnqIHwFZgx56ibwywPKQ==",
    "@snyk/snyk-cocoapods-plugin": "2.5.2",
    "@snyk/snyk-hex-plugin": "1.1.4",
    "snyk-docker-plugin": "^5.6.4",
    "snyk-mvn-plugin": "2.31.2",
    "snyk-python-plugin": "1.24.1",
    "snyk-sbt-plugin": "2.16.1",

Fixed code:
        "@snyk/snyk-cocoapods-plugin": "2.5.3",
        "@snyk/snyk-hex-plugin": "1.1.6",
        "snyk-docker-plugin": "5.6.5",
        "snyk-mvn-plugin": "2.31.3",
        "snyk-python-plugin": "1.24.2",
        "snyk-sbt-plugin": "2.16.2",
      "version": "2.5.3",
      "resolved": "https://registry.npmjs.org/@snyk/snyk-cocoapods-plugin/-/snyk-cocoapods-plugin-2.5.3.tgz",
      "integrity": "sha512-BMaE6jB2r57X6G8woGDhd+YjZ20kptRB+uXrpRFHf2PB+zQR2Ej5Vv8WKRkCCEK4Esi8hu/07b2HJiFX9DlR/A==",
        "shescape": "1.6.1",
      "version": "1.1.6",
      "resolved": "https://registry.npmjs.org/@snyk/snyk-hex-plugin/-/snyk-hex-plugin-1.1.6.tgz",
      "integrity": "sha512-6pe8O72QKiRCmS2X5sPZ0YUdE6F246GY1mNifNvU3upeTJWS3TRkhZ8P7vrIZ/Eo6o94hItUekB94aQwGq2s6A==",
        "shescape": "1.6.1",
      "version": "5.6.5",
      "resolved": "https://registry.npmjs.org/snyk-docker-plugin/-/snyk-docker-plugin-5.6.5.tgz",
      "integrity": "sha512-JOBkAaUaJBXj4xQ7Dc/tNQZBSaY8g3BHm/sAkyABSVs0g/vpX8rZkqcr1MhTP5jFsDL5TYVinD+coAR31k2j3A==",
        "shescape": "1.6.1",
      "version": "2.31.3",
      "resolved": "https://registry.npmjs.org/snyk-mvn-plugin/-/snyk-mvn-plugin-2.31.3.tgz",
      "integrity": "sha512-VX/KnqXLRycRQDowOtGuJru4b52wCMpfNIoZDneOqJBSLlZZ0Rb/KNueUtJbT2vm6fZln5bdEXEoME3GX/6bPw==",
        "shescape": "1.6.1",
      "version": "1.24.2",
      "resolved": "https://registry.npmjs.org/snyk-python-plugin/-/snyk-python-plugin-1.24.2.tgz",
      "integrity": "sha512-jzCBREfDGYLizRse8dFdZwx09tCh4p2z5HdA2zwdHj9Rl+LOKQUMrvr1elZGSt244WYqR3rdsObztrh3mDPWVQ==",
        "shescape": "1.6.1",
      "version": "2.16.2",
      "resolved": "https://registry.npmjs.org/snyk-sbt-plugin/-/snyk-sbt-plugin-2.16.2.tgz",
      "integrity": "sha512-aeciSOwj6GFLV9NdBrTvtbPoa5SxEWUSZaFC0MQYtaHMfCvQlLWSbcxjK4cqaCp31472tT63C9AKPla/ycn+5g==",
        "shescape": "1.6.1",
      "version": "2.5.3",
      "resolved": "https://registry.npmjs.org/@snyk/snyk-cocoapods-plugin/-/snyk-cocoapods-plugin-2.5.3.tgz",
      "integrity": "sha512-BMaE6jB2r57X6G8woGDhd+YjZ20kptRB+uXrpRFHf2PB+zQR2Ej5Vv8WKRkCCEK4Esi8hu/07b2HJiFX9DlR/A==",
        "shescape": "1.6.1",
      "version": "1.1.6",
      "resolved": "https://registry.npmjs.org/@snyk/snyk-hex-plugin/-/snyk-hex-plugin-1.1.6.tgz",
      "integrity": "sha512-6pe8O72QKiRCmS2X5sPZ0YUdE6F246GY1mNifNvU3upeTJWS3TRkhZ8P7vrIZ/Eo6o94hItUekB94aQwGq2s6A==",
        "shescape": "1.6.1",
      "version": "5.6.5",
      "resolved": "https://registry.npmjs.org/snyk-docker-plugin/-/snyk-docker-plugin-5.6.5.tgz",
      "integrity": "sha512-JOBkAaUaJBXj4xQ7Dc/tNQZBSaY8g3BHm/sAkyABSVs0g/vpX8rZkqcr1MhTP5jFsDL5TYVinD+coAR31k2j3A==",
        "shescape": "1.6.1",
      "version": "2.31.3",
      "resolved": "https://registry.npmjs.org/snyk-mvn-plugin/-/snyk-mvn-plugin-2.31.3.tgz",
      "integrity": "sha512-VX/KnqXLRycRQDowOtGuJru4b52wCMpfNIoZDneOqJBSLlZZ0Rb/KNueUtJbT2vm6fZln5bdEXEoME3GX/6bPw==",
        "shescape": "1.6.1",
      "version": "1.24.2",
      "resolved": "https://registry.npmjs.org/snyk-python-plugin/-/snyk-python-plugin-1.24.2.tgz",
      "integrity": "sha512-jzCBREfDGYLizRse8dFdZwx09tCh4p2z5HdA2zwdHj9Rl+LOKQUMrvr1elZGSt244WYqR3rdsObztrh3mDPWVQ==",
        "shescape": "1.6.1",
      "version": "2.16.2",
      "resolved": "https://registry.npmjs.org/snyk-sbt-plugin/-/snyk-sbt-plugin-2.16.2.tgz",
      "integrity": "sha512-aeciSOwj6GFLV9NdBrTvtbPoa5SxEWUSZaFC0MQYtaHMfCvQlLWSbcxjK4cqaCp31472tT63C9AKPla/ycn+5g==",
        "shescape": "1.6.1",
    "@snyk/snyk-cocoapods-plugin": "2.5.3",
    "@snyk/snyk-hex-plugin": "1.1.6",
    "snyk-docker-plugin": "5.6.5",
    "snyk-mvn-plugin": "2.31.3",
    "snyk-python-plugin": "1.24.2",
    "snyk-sbt-plugin": "2.16.2",