Find, fix and prevent vulnerabilities in your code.
high severity
- Vulnerable module: bcrypt
- Introduced through: bcrypt@3.0.8
Detailed paths
-
Introduced through: @phc/bcrypt@simonepri/phc-bcrypt#225fe73d3458a8f35f664f21e1cedd5545c256b4 › bcrypt@3.0.8Remediation: Upgrade to bcrypt@5.0.0.
Overview
bcrypt is an A library to help you hash passwords.
Affected versions of this package are vulnerable to Insecure Encryption. Data is truncated wrong when its length is greater than 255 bytes.
Remediation
Upgrade bcrypt to version 5.0.0 or higher.
References
medium severity
- Vulnerable module: tar
- Introduced through: bcrypt@3.0.8
Detailed paths
-
Introduced through: @phc/bcrypt@simonepri/phc-bcrypt#225fe73d3458a8f35f664f21e1cedd5545c256b4 › bcrypt@3.0.8 › node-pre-gyp@0.14.0 › tar@4.4.19
Overview
tar is a full-featured Tar for Node.js.
Affected versions of this package are vulnerable to Uncontrolled Resource Consumption ('Resource Exhaustion') due to the lack of folders count validation during the folder creation process. An attacker who generates a large number of sub-folders can consume memory on the system running the software and even crash the client within few seconds of running it using a path with too many sub-folders inside.
Remediation
Upgrade tar to version 6.2.1 or higher.
References
medium severity
- Vulnerable module: inflight
- Introduced through: bcrypt@3.0.8
Detailed paths
-
Introduced through: @phc/bcrypt@simonepri/phc-bcrypt#225fe73d3458a8f35f664f21e1cedd5545c256b4 › bcrypt@3.0.8 › node-pre-gyp@0.14.0 › rimraf@2.7.1 › glob@7.2.3 › inflight@1.0.6
Overview
Affected versions of this package are vulnerable to Missing Release of Resource after Effective Lifetime via the makeres function due to improperly deleting keys from the reqs object after execution of callbacks. This behavior causes the keys to remain in the reqs object, which leads to resource exhaustion.
Exploiting this vulnerability results in crashing the node process or in the application crash.
Note: This library is not maintained, and currently, there is no fix for this issue. To overcome this vulnerability, several dependent packages have eliminated the use of this library.
To trigger the memory leak, an attacker would need to have the ability to execute or influence the asynchronous operations that use the inflight module within the application. This typically requires access to the internal workings of the server or application, which is not commonly exposed to remote users. Therefore, “Attack vector” is marked as “Local”.
PoC
const inflight = require('inflight');
function testInflight() {
let i = 0;
function scheduleNext() {
let key = `key-${i++}`;
const callback = () => {
};
for (let j = 0; j < 1000000; j++) {
inflight(key, callback);
}
setImmediate(scheduleNext);
}
if (i % 100 === 0) {
console.log(process.memoryUsage());
}
scheduleNext();
}
testInflight();
Remediation
There is no fixed version for inflight.
References
medium severity
- Vulnerable module: bcrypt
- Introduced through: bcrypt@3.0.8
Detailed paths
-
Introduced through: @phc/bcrypt@simonepri/phc-bcrypt#225fe73d3458a8f35f664f21e1cedd5545c256b4 › bcrypt@3.0.8Remediation: Upgrade to bcrypt@5.0.0.
Overview
bcrypt is an A library to help you hash passwords.
Affected versions of this package are vulnerable to Cryptographic Issues. When hashing a password containing an ASCII NUL character, that character acts as the string terminator. Any following characters are ignored.
Remediation
Upgrade bcrypt to version 5.0.0 or higher.