You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Affected versions of this package are vulnerable to Uninitialized Memory Exposure. An attacker could extract sensitive data from uninitialized memory or may cause a Denial of Service (DoS) by passing in a large number, in setups where typed user input can be passed (e.g. from JSON).
Details
The Buffer class on Node.js is a mutable array of binary data, and can be initialized with a string, array or number.
constbuf1=newBuffer([1,2,3]);// creates a buffer containing [01, 02, 03]constbuf2=newBuffer('test');// creates a buffer containing ASCII bytes [74, 65, 73, 74]constbuf3=newBuffer(10);// creates a buffer of length 10
The first two variants simply create a binary representation of the value it received. The last one, however, pre-allocates a buffer of the specified size, making it a useful buffer, especially when reading data from a stream.
When using the number constructor of Buffer, it will allocate the memory, but will not fill it with zeros. Instead, the allocated buffer will hold whatever was in memory at the time. If the buffer is not zeroed by using buf.fill(0), it may leak sensitive information like keys, source code, and system info.
Remediation
Upgrade base64url to version 3.0.0 or higher. Note This is vulnerable only for Node <=4
Detailed paths
Overview
base64url Converting to, and from, base64url.
Affected versions of this package are vulnerable to Uninitialized Memory Exposure. An attacker could extract sensitive data from uninitialized memory or may cause a Denial of Service (DoS) by passing in a large number, in setups where typed user input can be passed (e.g. from JSON).
Details
The Buffer class on Node.js is a mutable array of binary data, and can be initialized with a string, array or number.
The first two variants simply create a binary representation of the value it received. The last one, however, pre-allocates a buffer of the specified size, making it a useful buffer, especially when reading data from a stream.
When using the number constructor of Buffer, it will allocate the memory, but will not fill it with zeros. Instead, the allocated buffer will hold whatever was in memory at the time. If the buffer is not
zeroed
by usingbuf.fill(0)
, it may leak sensitive information like keys, source code, and system info.Remediation
Upgrade
base64url
to version 3.0.0 or higher.Note This is vulnerable only for Node <=4
References
npm:base64url:20180511
base64url@0.0.6
The text was updated successfully, but these errors were encountered: