GHSA-GM9X-Q798-HMR4

Vulnerability from github – Published: 2020-07-29 14:53 – Updated: 2021-09-23 17:26
VLAI?
Summary
Command Injection in git-tags-remote
Details

All versions of git-tags-remote are vulnerable to Command Injection. The package fails to sanitize the repository input and passes it directly to an exec call on the get function . This may allow attackers to execute arbitrary code in the system if the repo value passed to the function is user-controlled.

The following proof-of-concept creates a file in /tmp:

const gitTagsRemote = require('git-tags-remote');

gitTagsRemote.get('https://github.com/sh0ji/git-tags-remote.git; echo "Injection Success" > /tmp/command-injection.test')
.then(tags => console.log(tags));
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "git-tags-remote"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.0.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-78"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-07-29T14:52:24Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "All versions of `git-tags-remote ` are vulnerable to Command Injection. The package fails to sanitize the repository input and passes it directly to an `exec` call on the `get` function . This may allow attackers to execute arbitrary code in the system if the `repo` value passed to the function is user-controlled.  \n\nThe following proof-of-concept creates a file in `/tmp`:  \n```\nconst gitTagsRemote = require(\u0027git-tags-remote\u0027);\n\ngitTagsRemote.get(\u0027https://github.com/sh0ji/git-tags-remote.git; echo \"Injection Success\" \u003e /tmp/command-injection.test\u0027)\n.then(tags =\u003e console.log(tags));\n```",
  "id": "GHSA-gm9x-q798-hmr4",
  "modified": "2021-09-23T17:26:33Z",
  "published": "2020-07-29T14:53:40Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/sh0ji/git-tags-remote/issues/58"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sh0ji/git-tags-remote/commit/a20488960cbd2c98455386108253094897ebfc1c"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/sh0ji/git-tags-remote"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1517"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Command Injection in git-tags-remote"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…