Code Injection Affecting crossbow-lang package, versions *


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDnpm:crossbow-lang:20160819
  • published18 Sept 2016
  • disclosed9 Jan 2015

Introduced: 9 Jan 2015

CVE NOT AVAILABLE CWE-95  (opens in a new tab)

How to fix?

Latest release (v1.0.0) is vulnerable, so we suggest to avoid using it altogether, until a patch is made available.

Overview

crossbow-lang is an unmaintaned fork of dustjs-linkedin, a Javascript templating engine designed to run asynchronously on both the server and the browser. It is vulnerable to the same Code Injection vulnerability as Dust.js

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.

CVSS Scores

version 3.1