dustjs-linkedin@1.2.5 vulnerabilities

Asynchronous templates for the browser and server (LinkedIn fork)

Direct Vulnerabilities

Known vulnerabilities in the dustjs-linkedin package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Prototype Pollution

dustjs-linkedin is a Javascript templating engine designed to run asynchronously on both the server and the browser.

Affected versions of this package are vulnerable to Prototype Pollution. It is possible to pollute the blocks Array attribute of the object context within the compileBlocks function. This vulnerability can be leveraged for code execution since this property is added to the compiled function, which is then executed by the VM module.

How to fix Prototype Pollution?

Upgrade dustjs-linkedin to version 3.0.0 or higher.

<3.0.0
  • H
Code Injection

dustjs-linkedin is a Javascript templating engine designed to run asynchronously on both the server and the browser.

Affected versions of this package are vulnerable to Code Injection. Dust.js uses Javascript's eval() function to evaluate the "if" statement conditions. The input to the function is sanitized by escaping all potentially dangerous characters.

However, if the variable passed in is an array, no escaping is applied, exposing an easy path to code injection. The risk of exploit is especially high given the fact express, koa and many other Node.js servers allow users to force a query parameter to be an array using the param[]=value notation.

How to fix Code Injection?

Upgrade dustjs-linkedin to version 2.6.0 or higher.

<2.6.0