Skip to content

Instantly share code, notes, and snippets.

View tariqhawis's full-sized avatar
🎯
Focusing

Tariq Hawis tariqhawis

🎯
Focusing
View GitHub Profile
@tariqhawis
tariqhawis / chartist-js.md
Created July 31, 2024 03:15
Vulnerability Advisory: Prototype Pollution in chartist, versions <= 1.3.0

Vulnerability type: Prototype Pollution

Vendor of the Package: chartist-js

Affected Package:

  • Product: chartist
  • Version: 1.3.0
@tariqhawis
tariqhawis / CVE-2024-38998.md
Last active September 11, 2024 18:12
[CVE-2024-38998] A Prototype Pollution vulnerability Affecting requirejs package, versions < 2.3.7

Overview

Affected versions of this module are vulnerable to a Prototype Pollution vulnerability, due to missing check if the argument resolves to the object prototype. This allows the attacker to inject malicious object property using the built-in Object property __proto__ which is recursively assigned to all the objects in the program.

PoC

(async () => {
 const lib = await import('requirejs');
@tariqhawis
tariqhawis / google-protobuf-pp.md
Last active July 29, 2024 18:34
Prototype Pollution in google-protobuf, All versions

Overview

Affected versions of this module are vulnerable to Prototype Pollution due to missing check if the argument resolves to the object prototype. This allow the attacker to inject malicious object property using a built-in Object property such as __proto__ which recursively assigned to all the objects in the program.

PoC

(async () => {
  const goog = await import('google-protobuf');
var victim = {}
@tariqhawis
tariqhawis / CVE-2024-29651.md
Last active October 2, 2024 02:49
(CVE-2024-29651) Prototype Pollution vulnerability affecting @apidevtools/json-schema-ref-parser, versions 11.0.0, 11.1.0

Overview

json-schema-ref-parser is an NPM package for Parse, Resolve, and Dereference JSON Schema $ref pointers.

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 passing specially crafted input to this function.

Details:

The vulnerable functions: bundle(), parse(), resolve(), dereference() passes the argument options to an unsafe merge method, which recursively copy properties from one object to another. Such a function has the potential to modify any object reachable from the destination object, and the built-in Object.prototype is usually reachable through the special properties __proto__ and constructor.prototype.

@tariqhawis
tariqhawis / CVE-2024-29650.md
Last active May 18, 2024 02:33
(CVE-2024-29650) Prototype Pollution vulnerability affecting @thi.ng/paths module, versions <=5.1.62

Overview

Affected versions of this package (<=5.1.62) are vulnerable to prototype pollution via mutIn and mutInManyUnsafe 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 passing specially crafted input to these functions.

In the PoC code below, paths.mutIn invoked with a polluted __proto__ property, this property passed as an argument from mutIn() in mut-in.js to defMutator() in mutator.js and then assigned to the destination as follows:

        return s ? (t = s[a]) ? (t[b] = x, s) : void 0 : void 0;
@tariqhawis
tariqhawis / web3-utils-pp.md
Last active July 30, 2024 16:10
[CVE-2024-21505] Prototype Pollution Affecting web3-utils (4.1.1)

Overview
web3-utils is a sub-package of web3.js Web3.js whic is a TypeScript implementation of the Ethereum JSON RPC API and related tooling maintained by ChainSafe Systems. web3-utils contains useful utility functions for Dapp developers.

Attack Vector Affected versions of this package are vulnerable to Prototype Pollution via the utility functions format and mergeDeep, 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 passing specially crafted input to these functions.

@tariqhawis
tariqhawis / CVE-2024-24293.md
Last active May 18, 2024 03:40
(CVE-2024-24293) Prototype Pollution Affecting @bit/loader npm package

Overview

Affected versions of this package are vulnerable to Prototype Pollution where the merge is invoked in M function unsafely Since the infected e argument with proto object missing check if it resolves to the object prototype, the malicious property are then copied on the Object prototype by the merge operation to the empty object and recursively affected all the objects in the program.

PoC

(async () => {
 const lib = await import('@bit/loader');
@tariqhawis
tariqhawis / aliconnect-sdk.md
Last active March 22, 2024 19:47
Prototype Pollution Affecting @aliconnect/sdk package

Affected versions of this package are vulnerable to Prototype Pollution via the sdk function due to missing check if the attribute resolves to the object prototype.

To exploit vulnerability, someone may inject a malicious object from a user controllable input to aim function in aim.js. The input resolves to the object prototype thus modify the behavior of the program.

Poc:

var sdk = require("@aliconnect/sdk")
BAD_JSON = JSON.parse('{"__proto__":{"polluted":true}}');
@tariqhawis
tariqhawis / uplot-pp.md
Last active August 6, 2024 17:19
Prototype Pollution Affecting uPlot package, all versions

Overview

μPlot is a fast, memory-efficient Canvas 2D-based chart for plotting time series, lines, areas, ohlc & bars;

Affected versions of this package are vulnerable to Prototype Pollution via the uplot.assign function due to missing check if the attribute resolves to the object prototype.

Details

The module is vulenrable via assign function, the assignment of the property from source to destination occurred without proper validation of the user's input.

Keybase proof

I hereby claim:

  • I am tariqhawis on github.
  • I am tariqhawis (https://keybase.io/tariqhawis) on keybase.
  • I have a public key whose fingerprint is CBF9 4F73 C829 2458 F071 704D 2781 6E61 A18F AF65

To claim this, I am signing this object: