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.
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
.