Skip to main content

Improper Restriction of Operations within the Bounds of a Memory Buffer

CVE-2016-10518

Severity High
Score 7.5/10

Summary

A vulnerability was found in the ping functionality of the ws module before 1.0.1 which allowed clients to allocate memory by sending a ping frame. The ping functionality by default responds with a pong frame and the previously given payload of the ping frame. This is exactly what you expect, but internally ws always transforms all data that we need to send to a Buffer instance and that is where the vulnerability existed. ws didn't do any checks for the type of data it was sending. With buffers in node when you allocate it when a number instead of a string it will allocate the amount of bytes.

  • LOW
  • NETWORK
  • NONE
  • UNCHANGED
  • NONE
  • NONE
  • HIGH
  • NONE

CWE-119 - Buffer Overflow

Buffer overflow attacks involve data transit and operations exceeding the restricted memory buffer, thereby corrupting or overwriting data in adjacent memory locations. Such overflow allows the attacker to run arbitrary code or manipulate the existing code to cause privilege escalation, data breach, denial of service, system crash and even complete system compromise. Given that languages such as C and C++ lack default safeguards against overwriting or accessing data in their memory, applications utilizing these languages are most susceptible to buffer overflows attacks.

Advisory Timeline

  • Published