Skip to content

Instantly share code, notes, and snippets.

@mestrtee
mestrtee / CVE-2024-24294.md
Last active April 23, 2024 17:59
[ CVE-2024-24294] Prototype Pollution vulnerability affecting @blackprint/engine, versions >=0.8.12, <=0.9.1

Overview

Versions of @blackprint/engine from 0.8.12 to 0.9.1 are vulnerable to prototype pollution. The function setDeepProperty recursively assign the source property to the destination with out proper validation which can be exploited by an attacker by modifying the prototype of Object using a payload like: [["__proto__"], "..."]

PoC:

(async () => {
  const lib = await import('@blackprint/engine');
var victim = {}
console.log("Before Attack: ", JSON.stringify(victim.__proto__));
@mestrtee
mestrtee / bunt-util.md
Last active June 17, 2024 17:12
Prototype Pollution vulnerability affecting bunt/util@0.29.19

Overview

Affected versions of this package are vulnerable to Prototype Pollution. An attacker can manipulate the prototype of an object, potentially leading to the alteration of behavior of all objects inheriting from the affected prototype by modify built-in Object.prototype through reachable special properties __proto__ and constructor.prototype. Thus, the attacker can use one of these properties to pollute the application logic that can be escalated to Denial of service, remote code execution or cross-site scripting attacks.

Location:

@bunt/util/dist/esm/qs.js:12
@mestrtee
mestrtee / CVE-2024-30564.md
Last active April 23, 2024 18:04
[CVE-2024-30564] Prototype Pollution vulnerability affecting @andrei-tatar/nora-firebase-common module, versions >=1.0.41, <=1.12.2

All versions of this module are vulnerable to Prototype Pollution via updateState. The user's supplied value find its path to the vulnerable function updateStateInternal recursively copy all child properties in the source "user's supplied value" to the destination without proper security validation.

An attacker can exploit this vulnerability by manipulate the prototype of Object by modify built-in Object.prototype through reachable special properties __proto__ or constructor.prototype. Potentially leading to the alteration of behavior of all objects and consequently, the attacker escalate the attack to denial of service, remote code execution or privilege escalation.

Call stack:

updateStateInternal (nora-firebase-common/build/update-state.js:54)
Module.updateState (nora-firebase-common/build/update-state.js:6)
@mestrtee
mestrtee / depath-pp.md
Last active May 18, 2024 04:25
Prototype pollution vulnerability affecting depath (alias: cool-path) module, versions *

Overview

A prototype pollution affecting the module: depath (another alias name: cool-path). An attacker could potentially take advantage of a vulnerability to manipulate the behavior of the vulnerable application by abusing built-in Object properties such as __proto__.

The vulnerability located at setIn (lib/index.js:90). where set() method used to unsafely assign source property to the destination. An attacker can be exploit this method to copy malicious property to the built-in Object.prototype through the special properties __proto__ or constructor.prototype. Thus, the attacker can use one of these properties to pollute the application logic that can be escalated to Denial of service, remote code execution or cross-site scripting attacks.

PoC:

@mestrtee
mestrtee / CVE-2024-36580.md
Last active June 12, 2024 14:37
[CVE-2024-36580] Prototype Pollution vulnerability affecting @cdr0/sg, version 1.0.10

Overview

Affected versions of this module allow an attacker to manipulate the prototype of an object, potentially leading to the alteration of behavior of all objects inheriting from the affected prototype by modify built-in Object.prototype through reachable special properties __proto__ and constructor.prototype. Thus, the attacker can use one of these properties to pollute the application logic that can be escalated to Denial of service, remote code execution or cross-site scripting attacks.

Location:

@cdr0/sg/ref.js:89
@mestrtee
mestrtee / CVE-2024-36583.md
Last active June 12, 2024 14:39
[CVE-2024-36583] Prototype Pollution vulnerability affecting @byondreal/accessor, version <= 1.0.0

Overview

Affected versions of this package are vulnerable to Prototype Pollution. An attacker can manipulate the prototype of an object, potentially leading to the alteration of behavior of all objects inheriting from the affected prototype by modify built-in Object.prototype through reachable special properties __proto__ and constructor.prototype. Thus, the attacker can use one of these properties to pollute the application logic that can be escalated to Denial of service, remote code execution or cross-site scripting attacks.

Location:

@byondreal/accessor/index.js:31
@mestrtee
mestrtee / CVE-2024-36578.md
Last active June 12, 2024 14:32
[CVE-2024-36578] Prototype Pollution vulnerability affecting @akbr/update NPM module, version 1.0.0

Overview

Affected versions of this package are vulnerable to Prototype Pollution. An attacker can manipulate the prototype of an object, potentially leading to the alteration of behavior of all objects inheriting from the affected prototype by modify built-in Object.prototype through reachable special properties __proto__ and constructor.prototype. Thus, the attacker can use one of these properties to pollute the application logic that can be escalated to Denial of service, remote code execution or cross-site scripting attacks.

Location:

update/index.js:42
@mestrtee
mestrtee / json-override-pp.md
Last active May 18, 2024 03:54
Prototype Pollution vulnerability affecting json-override module, version *

Overview

Affected versions of this package are vulnerable to Prototype Pollution due to recursive assignment of properties from source to destination, an attacker can exploit this by injecting __proto__ as a key at the source which cause pollution to the global prototype, this can be escalated to Denial of service, remote code execution or cross-site scripting attacks based on the implementation of the package.

Location:

json-override/json-override.js:18

@mestrtee
mestrtee / 75lb-deep-merge.md
Last active May 18, 2024 04:22
Prototype Pollution vulnerability affecting @75lb/deep-merge NPM module, versions *

Overview

All versions of this package are vulnerable to Prototype Pollution due to reliance on vulnerable merge methods of lodash to merge objects. An attacker can manipulate the prototype of an object, potentially leading to the alteration of behavior of all objects inheriting from the affected prototype by modify built-in Object.prototype through reachable special properties __proto__ and constructor.prototype. Thus, the attacker can use one of these properties to pollute the application logic that can be escalated to Denial of service, remote code execution or cross-site scripting attacks.

PoC:

(async () => {
 const lib = await import('@75lb/deep-merge');
@mestrtee
mestrtee / CVE-2024-36581.md
Last active June 12, 2024 14:38
[CVE-2024-36581] Prototype Pollution vulnerability affecting @abw/badger-database, version 1.2.1

Overview

Affected versions of this package are vulnerable to Prototype Pollution. An attacker can manipulate the prototype of an object, potentially leading to the alteration of behavior of all objects inheriting from the affected prototype by modify built-in Object.prototype through reachable special properties __proto__ and constructor.prototype. Thus, the attacker can use one of these properties to pollute the application logic that can be escalated to Denial of service, remote code execution or cross-site scripting attacks.

Location:

@abw/badger-database/dist/badger-database.esm.js:1