Skip to content
Prototype pollution Disclosed report Intermediate CVE-2020-8125

[klona] Prototype pollution

The klona deep-clone library before version 1.1.1 allowed a crafted object to add arbitrary properties to the JavaScript Object prototype during cloning. An attacker could use this to cause denial of service or possibly remote code execution by overriding methods such as toString.

skyn3t Follow

Originally disclosed on HackerOne

Critical 9.4 View original
  • Fixed in 3 days
  • Disclosed after 3 days

I would like to report Prototype pollution in klona It allows adding arbitrary property to Prototype while deep cloning an object

Module

module name: klona version: <1.1.1 npm page: https://www.npmjs.com/package/klona

Module Description

A tiny (366B) and fast utility to "deep clone" Objects, Arrays, Dates, RegExps, and more!

Module Stats

356 weekly downloads

Vulnerability

Vulnerability Description

See: https://snyk.io/vuln/SNYK-JS-LODASH-450202

Steps To Reproduce:

Described here: https://github.com/lukeed/klona/pull/11/files

Note: This vulnerability was reported directly to owner here https://github.com/lukeed/klona/pull/11 on 10/01/2020. Fix published in v1.1.1 on 15/01/2020

Wrap up

  • I contacted the maintainer to let them know: Y
  • I opened an issue in the related repository: Y

Hunter's comments and funny memes goes here

ZomboMeme_18012020195556.jpg
ZomboMeme_18012020195556.jpg From the original on HackerOne

Impact

Denial of Service and possible Remote code execution by overriding object's property methods like toString

The original report as published on HackerOne, by skyn3t. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could cause denial of service and possibly remote code execution by overriding object property methods like toString.

What the attacker needed

Attacker-controlled object passed to klona; klona version below 1.1.1

The fix

The issue was fixed in version 1.1.1.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

JavaScript objects inherit shared defaults from a 'prototype' object. If a program copies attacker-supplied data into that shared prototype, every object in the program can be changed, which can break the app or let an attacker run their own code. Here the copying happened inside a small library used to make deep copies of objects.

What is Prototype pollution?

Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.

More by skyn3t

View all

9 more disclosed reports, best first.

More from Node.js third-party modules

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Prototype pollution

The lesson behind this report.

Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.