Miggo Logo

CVE-2021-4279: Starcounter-Jack JSON-Patch Prototype Pollution vulnerability

7.3

CVSS Score
3.1

Basic Information

EPSS Score
0.29446%
Published
12/25/2022
Updated
3/1/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
fast-json-patchnpm< 3.1.13.1.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from insufficient validation in the applyOperation function across all implementations (TypeScript, CommonJS, and ESM). The commit diff shows the fix added checks for both __proto__ and constructor/prototype path segments. Prior to the patch, these functions allowed modification of prototype attributes via nested keys, as demonstrated in the PoC using paths like /constructor/prototype/polluted. The functions' role in processing JSON Patch operations made them the entry point for uncontrolled prototype modifications.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* vuln*r**ility **s ***n *oun* in St*r*ount*r-J**k JSON-P*t** up to *.*.* *n* *l*ssi*i** *s pro*l*m*ti*. T*is vuln*r**ility *****ts unknown *o**. T** m*nipul*tion l***s to improp*rly *ontroll** mo*i*i**tion o* o*j**t prototyp* *ttri*ut*s ('prototyp*

Reasoning

T** vuln*r**ility st*mm** *rom insu**i*i*nt v*li**tion in t** `*pplyOp*r*tion` *un*tion **ross *ll impl*m*nt*tions (Typ*S*ript, *ommonJS, *n* *SM). T** *ommit *i** s*ows t** *ix ***** ****ks *or *ot* `__proto__` *n* `*onstru*tor/prototyp*` p*t* s**m*