Find, fix and prevent vulnerabilities in your code.
critical severity
- Vulnerable module: babel-traverse
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-block-scoping@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-parameters@6.24.1 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-helpers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-block-scoping@6.26.0 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-computed-properties@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-commonjs@6.26.2 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-systemjs@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-umd@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-parameters@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-function-name@6.24.1 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-function-name@6.24.1 › babel-helper-function-name@6.24.1 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-object-super@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-parameters@6.24.1 › babel-helper-call-delegate@6.24.1 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-function-name@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-function-name@6.24.1 › babel-helper-function-name@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-object-super@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-plugin-transform-es2015-modules-commonjs@6.26.2 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-umd@6.24.1 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-define-map@6.26.0 › babel-helper-function-name@6.24.1 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-helpers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-define-map@6.26.0 › babel-helper-function-name@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-umd@6.24.1 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-plugin-transform-es2015-modules-commonjs@6.26.2 › babel-template@6.26.0 › babel-traverse@6.26.0
…and 28 more
Overview
Affected versions of this package are vulnerable to Incomplete List of Disallowed Inputs when using plugins that rely on the path.evaluate()
or path.evaluateTruthy()
internal Babel methods.
Note:
This is only exploitable if the attacker uses known affected plugins such as @babel/plugin-transform-runtime
, @babel/preset-env
when using its useBuiltIns
option, and any "polyfill provider" plugin that depends on @babel/helper-define-polyfill-provider
. No other plugins under the @babel/
namespace are impacted, but third-party plugins might be.
Users that only compile trusted code are not impacted.
Workaround
Users who are unable to upgrade the library can upgrade the affected plugins instead, to avoid triggering the vulnerable code path in affected @babel/traverse
.
Remediation
There is no fixed version for babel-traverse
.
References
high severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, appirio-tech-ng-ui-components@2.2.4 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5Remediation: Upgrade to angular@1.8.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 1 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS). XSS may be triggered in AngularJS applications that sanitize user-controlled HTML snippets before passing them to JQLite
methods like JQLite.prepend
, JQLite.after
, JQLite.append
, JQLite.replaceWith
, JQLite.append
, new JQLite
and angular.element
.
JQLite (DOM manipulation library that's part of AngularJS) manipulates input HTML before inserting it to the DOM in jqLiteBuildFragment
.
One of the modifications performed expands an XHTML self-closing tag.
If jqLiteBuildFragment
is called (e.g. via new JQLite(aString)
) with user-controlled HTML string that was sanitized (e.g. with DOMPurify), the transformation done by JQLite may modify some forms of an inert, sanitized payload into a payload containing JavaScript - and trigger an XSS when the payload is inserted into DOM.
PoC
const inertPayload = `<div><style><style/><img src=x onerror="alert(1337)"/>`
Note that the style element is not closed and <img
would be a text node inside the style if inserted into the DOM as-is.
As such, some HTML sanitizers would leave the <img
as is without processing it and stripping the onerror
attribute.
angular.element(document).append(inertPayload);
This will alert, as <style/>
will be replaced with <style></style>
before adding it to the DOM, closing the style element early and reactivating img
.
Details
A cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <
can be coded as <
; and >
can be coded as >
; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <
and >
as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
Type | Origin | Description |
---|---|---|
Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?
,&
,/
,<
,>
and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
Upgrade angular
to version 1.8.0 or higher.
References
high severity
- Vulnerable module: whet.extend
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › svgo@0.6.6 › whet.extend@0.9.9
Overview
whet.extend is an A sharped version of port of jQuery.extend that actually works on node.js
Affected versions of this package are vulnerable to Prototype Pollution due to improper user input sanitization when using the extend
and _findValue
functions.
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
There is no fixed version for whet.extend
.
References
high severity
- Vulnerable module: lodash
- Introduced through: lodash@4.17.4
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › lodash@4.17.4Remediation: Upgrade to lodash@4.17.20.
Overview
lodash is a modern JavaScript utility library delivering modularity, performance, & extras.
Affected versions of this package are vulnerable to Prototype Pollution. The function zipObjectDeep
can be tricked into adding or modifying properties of the Object prototype. These properties will be present on all objects.
PoC
const _ = require('lodash');
_.zipObjectDeep(['__proto__.z'],[123]);
console.log(z); // 123
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
Upgrade lodash
to version 4.17.20 or higher.
References
high severity
- Vulnerable module: auth0-js
- Introduced through: auth0-js@6.8.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › auth0-js@6.8.4Remediation: Upgrade to auth0-js@8.0.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › auth0-js@6.8.4
Overview
auth0-js is a Client Side Javascript toolkit for Auth0 API.
Affected versions of this package are vulnerable to Privilege Escalation via the parseHash
method. It did not properly validate the JWT
audience, and therefore allowed tokens intended for one tenant to be used at another.
Remediation
Upgrade auth0-js
to version 8.0.0 or higher.
References
high severity
- Vulnerable module: js-yaml
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › js-yaml@3.6.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › svgo@0.6.6 › js-yaml@3.6.1
Overview
js-yaml is a human-friendly data serialization language.
Affected versions of this package are vulnerable to Arbitrary Code Execution. When an object with an executable toString()
property used as a map key, it will execute that function. This happens only for load()
, which should not be used with untrusted data anyway. safeLoad()
is not affected because it can't parse functions.
Remediation
Upgrade js-yaml
to version 3.13.1 or higher.
References
high severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, angular-filter@0.5.16 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-filter@0.5.16 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-ui-router@0.4.2 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › appirio-tech-ng-work-constants@0.0.1 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 10 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). A regular expression used to split the value of the ng-srcset
directive is vulnerable to super-linear runtime due to backtracking. With large carefully-crafted input, this can result in catastrophic backtracking and cause a denial of service.
Note:
This package is EOL and will not receive any updates to address this issue. Users should migrate to @angular/core.
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:
- CCC
- CC+C
- C+CC
- 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 fixed version for angular
.
References
high severity
- Vulnerable module: ansi-regex
- Introduced through: html-webpack-plugin@2.30.1 and appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › html-webpack-plugin@2.30.1 › pretty-error@2.1.2 › renderkid@2.0.7 › strip-ansi@3.0.1 › ansi-regex@2.1.1Remediation: Upgrade to html-webpack-plugin@5.5.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › html-webpack-plugin@2.30.1 › pretty-error@2.1.2 › renderkid@2.0.7 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › yargs@4.8.1 › string-width@1.0.2 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › yargs@4.8.1 › cliui@3.2.0 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › yargs@4.8.1 › cliui@3.2.0 › string-width@1.0.2 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › yargs@4.8.1 › cliui@3.2.0 › wrap-ansi@2.1.0 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › svgo@0.6.6 › csso@2.0.0 › clap@1.2.3 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › yargs@4.8.1 › cliui@3.2.0 › wrap-ansi@2.1.0 › string-width@1.0.2 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › svgo@0.6.6 › csso@2.0.0 › clap@1.2.3 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-block-scoping@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-parameters@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-block-scoping@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-parameters@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-helpers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-block-scoping@6.26.0 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-computed-properties@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-commonjs@6.26.2 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-systemjs@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-umd@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-parameters@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-function-name@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-function-name@6.24.1 › babel-helper-function-name@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-object-super@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-parameters@6.24.1 › babel-helper-call-delegate@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-helpers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-block-scoping@6.26.0 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-computed-properties@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-commonjs@6.26.2 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-systemjs@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-umd@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-parameters@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-function-name@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-function-name@6.24.1 › babel-helper-function-name@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-object-super@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-parameters@6.24.1 › babel-helper-call-delegate@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-function-name@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-function-name@6.24.1 › babel-helper-function-name@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-object-super@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-plugin-transform-es2015-modules-commonjs@6.26.2 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-umd@6.24.1 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-define-map@6.26.0 › babel-helper-function-name@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-function-name@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-function-name@6.24.1 › babel-helper-function-name@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-object-super@6.24.1 › babel-helper-replace-supers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-plugin-transform-es2015-modules-commonjs@6.26.2 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-umd@6.24.1 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-define-map@6.26.0 › babel-helper-function-name@6.24.1 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-helpers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-define-map@6.26.0 › babel-helper-function-name@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-umd@6.24.1 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-plugin-transform-es2015-modules-commonjs@6.26.2 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › babel-helpers@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-classes@6.24.1 › babel-helper-define-map@6.26.0 › babel-helper-function-name@6.24.1 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-preset-es2015@6.13.2 › babel-plugin-transform-es2015-modules-umd@6.24.1 › babel-plugin-transform-es2015-modules-amd@6.24.1 › babel-plugin-transform-es2015-modules-commonjs@6.26.2 › babel-template@6.26.0 › babel-traverse@6.26.0 › babel-code-frame@6.26.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1
…and 72 more
Overview
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) due to the sub-patterns [[\\]()#;?]*
and (?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*
.
PoC
import ansiRegex from 'ansi-regex';
for(var i = 1; i <= 50000; i++) {
var time = Date.now();
var attack_str = "\u001B["+";".repeat(i*10000);
ansiRegex().test(attack_str)
var time_cost = Date.now() - time;
console.log("attack_str.length: " + attack_str.length + ": " + time_cost+" 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:
- CCC
- CC+C
- C+CC
- 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 ansi-regex
to version 3.0.1, 4.1.1, 5.0.1, 6.0.1 or higher.
References
high severity
- Vulnerable module: auth0-js
- Introduced through: auth0-js@6.8.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › auth0-js@6.8.4Remediation: Upgrade to auth0-js@9.3.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › auth0-js@6.8.4
Overview
auth0-js is a client Side Javascript toolkit for Auth0 API.
Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) due to mishandling the case where the authorization response lacks the state parameter.
Remediation
Upgrade auth0-js
to version 9.3 or higher.
References
high severity
- Vulnerable module: axios
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.1
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:
- CCC
- CC+C
- C+CC
- 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
- Vulnerable module: loader-utils
- Introduced through: html-webpack-plugin@2.30.1 and appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › html-webpack-plugin@2.30.1 › loader-utils@0.2.17Remediation: Upgrade to html-webpack-plugin@4.0.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › html-webpack-plugin@2.30.1 › loader-utils@0.2.17
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › loader-utils@0.2.17
Overview
Affected versions of this package are vulnerable to Prototype Pollution in parseQuery
function via the name variable in parseQuery.js
. This pollutes the prototype of the object returned by parseQuery
and not the global Object prototype (which is the commonly understood definition of Prototype Pollution). Therefore, the actual impact will depend on how applications utilize the returned object and how they filter unwanted keys.
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
Upgrade loader-utils
to version 1.4.1, 2.0.3 or higher.
References
high severity
- Vulnerable module: lodash
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and lodash@4.17.4
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › normalizr@1.4.1 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › lodash@4.17.4Remediation: Upgrade to lodash@4.17.17.
Overview
lodash is a modern JavaScript utility library delivering modularity, performance, & extras.
Affected versions of this package are vulnerable to Prototype Pollution through the zipObjectDeep
function due to improper user input sanitization in the baseZipObject
function.
PoC
lodash.zipobjectdeep:
const zipObjectDeep = require("lodash.zipobjectdeep");
let emptyObject = {};
console.log(`[+] Before prototype pollution : ${emptyObject.polluted}`);
//[+] Before prototype pollution : undefined
zipObjectDeep(["constructor.prototype.polluted"], [true]);
//we inject our malicious attributes in the vulnerable function
console.log(`[+] After prototype pollution : ${emptyObject.polluted}`);
//[+] After prototype pollution : true
lodash:
const test = require("lodash");
let emptyObject = {};
console.log(`[+] Before prototype pollution : ${emptyObject.polluted}`);
//[+] Before prototype pollution : undefined
test.zipObjectDeep(["constructor.prototype.polluted"], [true]);
//we inject our malicious attributes in the vulnerable function
console.log(`[+] After prototype pollution : ${emptyObject.polluted}`);
//[+] After prototype pollution : true
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
Upgrade lodash
to version 4.17.17 or higher.
References
high severity
- Vulnerable module: moment
- Introduced through: appirio-tech-ng-ui-components@2.2.4, tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › moment@2.10.6
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › moment@2.10.6
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › moment@2.18.1Remediation: Upgrade to moment@2.29.2.
Overview
moment is a lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
Affected versions of this package are vulnerable to Directory Traversal when a user provides a locale string which is directly used to switch moment locale.
Details
A Directory Traversal attack (also known as path traversal) aims to access files and directories that are stored outside the intended folder. By manipulating files with "dot-dot-slash (../)" sequences and its variations, or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system, including application source code, configuration, and other critical system files.
Directory Traversal vulnerabilities can be generally divided into two types:
- Information Disclosure: Allows the attacker to gain information about the folder structure or read the contents of sensitive files on the system.
st
is a module for serving static files on web pages, and contains a vulnerability of this type. In our example, we will serve files from the public
route.
If an attacker requests the following URL from our server, it will in turn leak the sensitive private key of the root user.
curl http://localhost:8080/public/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/root/.ssh/id_rsa
Note %2e
is the URL encoded version of .
(dot).
- Writing arbitrary files: Allows the attacker to create or replace existing files. This type of vulnerability is also known as
Zip-Slip
.
One way to achieve this is by using a malicious zip
archive that holds path traversal filenames. When each filename in the zip archive gets concatenated to the target extraction folder, without validation, the final path ends up outside of the target folder. If an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily.
The following is an example of a zip
archive with one benign file and one malicious file. Extracting the malicious file will result in traversing out of the target folder, ending up in /root/.ssh/
overwriting the authorized_keys
file:
2018-04-15 22:04:29 ..... 19 19 good.txt
2018-04-15 22:04:42 ..... 20 20 ../../../../../../root/.ssh/authorized_keys
Remediation
Upgrade moment
to version 2.29.2 or higher.
References
high severity
- Vulnerable module: moment
- Introduced through: moment@2.18.1
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › moment@2.18.1Remediation: Upgrade to moment@2.29.4.
Overview
moment is a lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the preprocessRFC2822()
function in from-string.js
, when processing a very long crafted string (over 10k characters).
PoC:
moment("(".repeat(500000))
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:
- CCC
- CC+C
- C+CC
- 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 moment
to version 2.29.4 or higher.
References
high severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, appirio-tech-ng-ui-components@2.2.4 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5Remediation: Upgrade to angular@1.7.9.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 1 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Prototype Pollution. The function merge()
could be tricked into adding or modifying properties of Object.prototype
using a __proto__
payload.
PoC by Snyk
angular.merge({}, JSON.parse('{"__proto__": {"xxx": "polluted"}}'));
console.log(({}).xxx);
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
Upgrade angular
to version 1.7.9 or higher.
References
high severity
- Vulnerable module: follow-redirects
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.1 › follow-redirects@0.0.7
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
- Vulnerable module: lodash
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and lodash@4.17.4
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › normalizr@1.4.1 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › lodash@4.17.4Remediation: Upgrade to lodash@4.17.12.
Overview
lodash is a modern JavaScript utility library delivering modularity, performance, & extras.
Affected versions of this package are vulnerable to Prototype Pollution. The function defaultsDeep
could be tricked into adding or modifying properties of Object.prototype
using a constructor
payload.
PoC by Snyk
const mergeFn = require('lodash').defaultsDeep;
const payload = '{"constructor": {"prototype": {"a0": true}}}'
function check() {
mergeFn({}, JSON.parse(payload));
if (({})[`a0`] === true) {
console.log(`Vulnerable to Prototype Pollution via ${payload}`);
}
}
check();
For more information, check out our blog post
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
Upgrade lodash
to version 4.17.12 or higher.
References
high severity
- Vulnerable module: lodash
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and lodash@4.17.4
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › normalizr@1.4.1 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › lodash@4.17.4Remediation: Upgrade to lodash@4.17.17.
Overview
lodash is a modern JavaScript utility library delivering modularity, performance, & extras.
Affected versions of this package are vulnerable to Prototype Pollution via the set
and setwith
functions due to improper user input sanitization.
PoC
lod = require('lodash')
lod.set({}, "__proto__[test2]", "456")
console.log(Object.prototype)
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
Upgrade lodash
to version 4.17.17 or higher.
References
high severity
- Vulnerable module: lodash
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and lodash@4.17.4
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › normalizr@1.4.1 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › lodash@4.17.4Remediation: Upgrade to lodash@4.17.11.
Overview
lodash is a modern JavaScript utility library delivering modularity, performance, & extras.
Affected versions of this package are vulnerable to Prototype Pollution. The functions merge
, mergeWith
, and defaultsDeep
could be tricked into adding or modifying properties of Object.prototype
. This is due to an incomplete fix to CVE-2018-3721
.
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
Upgrade lodash
to version 4.17.11 or higher.
References
high severity
- Vulnerable module: lodash
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and lodash@4.17.4
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › normalizr@1.4.1 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › lodash@4.17.4Remediation: Upgrade to lodash@4.17.21.
Overview
lodash is a modern JavaScript utility library delivering modularity, performance, & extras.
Affected versions of this package are vulnerable to Code Injection via template
.
PoC
var _ = require('lodash');
_.template('', { variable: '){console.log(process.env)}; with(obj' })()
Remediation
Upgrade lodash
to version 4.17.21 or higher.
References
high severity
- Vulnerable module: angular
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) due to no proper sanitization of xlink:href
attributes.
Details
A cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <
can be coded as <
; and >
can be coded as >
; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <
and >
as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
Type | Origin | Description |
---|---|---|
Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?
,&
,/
,<
,>
and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
Upgrade angular
to version 1.5.0-beta.0 or higher.
References
high severity
- Vulnerable module: angular
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS).
This error occurs when $sanitize
sanitizer tries to check the input for possible mXSS payload and the verification errors due to the input mutating indefinitely. This could be a sign that the payload contains code exploiting an mXSS vulnerability in the browser.
mXSS attack exploit browser bugs that cause some browsers parse a certain html strings into DOM, which once serialized doesn't match the original input. These browser bugs can be exploited by attackers to create payload which looks harmless to sanitizers, but due to mutations caused by the browser are turned into dangerous code once processed after sanitization.
Details
Remediation
Upgrade angular
to version 1.5.0-beta.2 or higher.
References
high severity
- Vulnerable module: axios
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.1
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-TOKEN
0 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
- Module: intro.js
- Introduced through: intro.js@1.1.1
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › intro.js@1.1.1
AGPL-3.0 license
medium severity
- Vulnerable module: angular
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Clickjacking. By enabling the SVG setting without taking other precautions, you might expose your application to click-hijacking attacks. In these attacks, sanitized SVG elements could be positioned outside of the containing element and be rendered over other elements on the page (e.g. a login link). Such behavior can then result in phishing incidents.
To protect against these, explicitly setup overflow: hidden
css rule for all potential SVG tags within the sanitized content:
.rootOfTheIncludedContent svg {
overflow: hidden !important;
}
Remediation
Upgrade angular
to version 1.5.0-beta.0 or higher.
References
medium severity
- Vulnerable module: angucomplete-alt
- Introduced through: angucomplete-alt@2.5.0 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angucomplete-alt@2.5.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angucomplete-alt@2.5.0
Overview
angucomplete-alt is an Autocomplete Directive for AngularJS. A fork of Daryl Rowland's angucomplete (https://github.com/darylrowland/angucomplete) with some extra features.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS).
Details
Remediation
There is no fixed version for angucomplete-alt
.
References
medium severity
- Vulnerable module: angular
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS). The $http
service allows JSONP requests with untrusted URLs, which could be exploited by an attacker.
Details
A cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <
can be coded as <
; and >
can be coded as >
; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <
and >
as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
Type | Origin | Description |
---|---|---|
Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?
,&
,/
,<
,>
and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
Upgrade angular
to version 1.6.0-rc.0 or higher.
References
medium severity
- Vulnerable module: angular
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS). None
Details
A cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <
can be coded as <
; and >
can be coded as >
; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <
and >
as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
Type | Origin | Description |
---|---|---|
Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?
,&
,/
,<
,>
and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
Upgrade angular
to version 1.6.5 or higher.
References
medium severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, appirio-tech-ng-ui-components@2.2.4 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5Remediation: Upgrade to angular@1.6.7.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 1 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS).
Browsers mutate attributes values such as  javascript:alert(1)
when they are written to the DOM via innerHTML
in various vendor specific ways.
In Chrome (<62), this mutation removed the preceding "whitespace" resulting in a value that could end up being executed as JavaScript.
Here is an example of what could happen:
// Code goes here
var h1 = document.querySelector('h1');
h1.innerHTML = '<a href=" javascript:alert(1)">CLICKME</a>';
var innerHTML = h1.innerHTML;
console.log(innerHTML);
h1.innerHTML = innerHTML;
The sanitizer contains a bit of code that triggers this mutation on an inert piece of DOM, before angular sanitizes it.
Note: Chrome 62 does not appear to mutate this particular string any more, instead it just leaves the "whitespace" in place. This probably means that Chrome 62 is no longer vulnerable to this specific attack vector.
Details
Remediation
Upgrade angular
to version 1.6.7 or higher.
References
medium severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, appirio-tech-ng-ui-components@2.2.4 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5Remediation: Upgrade to angular@1.6.9.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 1 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) through SVG files if enableSvg
is set.
Details
A cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <
can be coded as <
; and >
can be coded as >
; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <
and >
as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
Type | Origin | Description |
---|---|---|
Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?
,&
,/
,<
,>
and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
Upgrade angular
to version 1.6.9 or higher.
References
medium severity
- Vulnerable module: angular
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to JSONP Callback Attack. JSONP
(JSON with padding) is a method used to request data from a server residing in a different domain than the client.
Any url could perform JSONP requests, allowing full access to the browser and the JavaScript context. This can lead to Cross-site Scripting.
Details
A cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <
can be coded as <
; and >
can be coded as >
; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <
and >
as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
Type | Origin | Description |
---|---|---|
Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?
,&
,/
,<
,>
and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
Upgrade angular
to version 1.6.1 or higher.
References
medium severity
- Vulnerable module: angular-jwt
- Introduced through: angular-jwt@0.0.9 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-jwt@0.0.9Remediation: Upgrade to angular-jwt@0.1.10.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular-jwt@0.0.9
Overview
angular-jwt is a library to help you work with JWTs.
Affected versions of this package are vulnerable to Access Restriction Bypass. Due to treating whiteListedDomains
entries as regular expressions, An attacker with knowledge of the jwtInterceptorProvider.whiteListedDomains
setting could bypass the domain whitelist filter via a crafted domain.
Remediation
Upgrade angular-jwt
to version 0.1.10 or higher.
References
medium severity
- Vulnerable module: auth0-js
- Introduced through: auth0-js@6.8.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › auth0-js@6.8.4Remediation: Upgrade to auth0-js@9.0.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › auth0-js@6.8.4
Overview
auth0-js is a Client Side Javascript toolkit for Auth0 API.
Affected versions of this package are vulnerable to Cross-Site Request Forgery (CSRF) attacks if the Legacy Lock API flag is enabled.
Once the user credentials are verified, an HTML form is rendered into the user’s browser. A JSON Web Token (JWT) is POSTed to the /login/callback
endpoint, and it maintains state regarding the identity of the user. Due to the lack of session binding, this form post is susceptible to CSRF. An attacker with valid user credentials at an Auth0 tenant can use them to gain such a form, and then employ techniques such as social engineering or clickjacking to have a victim’s browser execute it.
Remediation
Upgrade auth0-js
to version 9.0.0 or higher.
References
medium severity
- Vulnerable module: follow-redirects
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.1 › follow-redirects@0.0.7
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
- Vulnerable module: node-fetch
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3, tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › isomorphic-fetch@2.2.1 › node-fetch@1.7.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › isomorphic-fetch@2.2.1 › node-fetch@1.7.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › topcoder-app-r@https://github.com/appirio-tech/topcoder-app-r.git#0.0.2 › isomorphic-fetch@2.2.1 › node-fetch@1.7.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › isomorphic-fetch@2.2.1 › node-fetch@1.7.3
…and 1 more
Overview
node-fetch is a light-weight module that brings window.fetch to node.js
Affected versions of this package are vulnerable to Information Exposure when fetching a remote url with Cookie, if it get a Location
response header, it will follow that url and try to fetch that url with provided cookie. This can lead to forwarding secure headers to 3th party.
Remediation
Upgrade node-fetch
to version 2.6.7, 3.1.1 or higher.
References
medium severity
- Vulnerable module: json5
- Introduced through: html-webpack-plugin@2.30.1 and appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › html-webpack-plugin@2.30.1 › loader-utils@0.2.17 › json5@0.5.1Remediation: Upgrade to html-webpack-plugin@4.0.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › html-webpack-plugin@2.30.1 › loader-utils@0.2.17 › json5@0.5.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › loader-utils@0.2.17 › json5@0.5.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › babel-register@6.26.0 › babel-core@6.26.3 › json5@0.5.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › babel-core@6.13.2 › json5@0.4.0
…and 2 more
Overview
Affected versions of this package are vulnerable to Prototype Pollution via the parse
method , which does not restrict parsing of keys named __proto__
, allowing specially crafted strings to pollute the prototype of the resulting object. This pollutes the prototype of the object returned by JSON5.parse
and not the global Object prototype (which is the commonly understood definition of Prototype Pollution). Therefore, the actual impact will depend on how applications utilize the returned object and how they filter unwanted keys.
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
Upgrade json5
to version 1.0.2, 2.2.2 or higher.
References
medium severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, angular-filter@0.5.16 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-filter@0.5.16 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-ui-router@0.4.2 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › appirio-tech-ng-work-constants@0.0.1 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 10 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Improper Validation of Unsafe Equivalence in Input in the srcset
attribute, which allows bypassing the imgSrcSanitizationTrustedUrlList
allowlist. An attacker can manipulate the content presented to other users by setting a srcset
value to retrieve data from an unintended domain.
Remediation
There is no fixed version for angular
.
References
medium severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, angular-filter@0.5.16 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-filter@0.5.16 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-ui-router@0.4.2 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › appirio-tech-ng-work-constants@0.0.1 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 10 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Incomplete Filtering of Special Elements. The srcset
attribute in an HTML <source>
element can be a vector for content spoofing. An attacker can manipulate the content presented to other users by interpolating a srcset
value directly that doesn't comply with image source restrictions, or by using the ngAttrSrcset
directive.
Note: The ngSrcset
and ngPropSrcset
directives are not attack vectors for this vulnerability.
Remediation
There is no fixed version for angular
.
References
medium severity
- Vulnerable module: lodash
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and lodash@4.17.4
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › lodash@3.10.1Remediation: Open PR to patch lodash@3.10.1.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › normalizr@1.4.1 › lodash@3.10.1Remediation: Open PR to patch lodash@3.10.1.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › lodash@4.17.4Remediation: Upgrade to lodash@4.17.5.
Overview
lodash is a modern JavaScript utility library delivering modularity, performance, & extras.
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 _= require('lodash');
var malicious_payload = '{"__proto__":{"oops":"It works !"}}';
var a = {};
console.log("Before : " + a.oops);
_.merge({}, JSON.parse(malicious_payload));
console.log("After : " + a.oops);
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
Upgrade lodash
to version 4.17.5 or higher.
References
medium severity
- Vulnerable module: axios
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.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) 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
- Vulnerable module: axios
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.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) 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
- Vulnerable module: inflight
- Introduced through: appirio-tech-ng-ui-components@2.2.4, appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › react@0.14.10 › envify@3.4.1 › jstransform@11.0.3 › commoner@0.10.8 › glob@5.0.15 › inflight@1.0.6
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react@0.14.10 › envify@3.4.1 › jstransform@11.0.3 › commoner@0.10.8 › glob@5.0.15 › inflight@1.0.6
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › topcoder-app-r@https://github.com/appirio-tech/topcoder-app-r.git#0.0.2 › react@0.14.10 › envify@3.4.1 › jstransform@11.0.3 › commoner@0.10.8 › glob@5.0.15 › inflight@1.0.6
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › react@0.14.10 › envify@3.4.1 › jstransform@11.0.3 › commoner@0.10.8 › glob@5.0.15 › inflight@1.0.6
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › react@0.14.10 › envify@3.4.1 › jstransform@11.0.3 › commoner@0.10.8 › glob@5.0.15 › inflight@1.0.6
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › topcoder-app-r@https://github.com/appirio-tech/topcoder-app-r.git#0.0.2 › tc-ui@1.0.12 › react@0.14.10 › envify@3.4.1 › jstransform@11.0.3 › commoner@0.10.8 › glob@5.0.15 › inflight@1.0.6
…and 3 more
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
- Vulnerable module: axios
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.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
- Vulnerable module: js-yaml
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › js-yaml@3.6.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › svgo@0.6.6 › js-yaml@3.6.1
Overview
js-yaml is a human-friendly data serialization language.
Affected versions of this package are vulnerable to Denial of Service (DoS). The parsing of a specially crafted YAML file may exhaust the system resources.
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:
- CCC
- CC+C
- C+CC
- 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 js-yaml
to version 3.13.0 or higher.
References
medium severity
- Vulnerable module: moment
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › moment@2.10.6
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › moment@2.10.6
Overview
moment
is a lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
Affected versions of the package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks for any locale that has separate format and standalone options and format
input can be controlled by the user.
An attacker can provide a specially crafted input to the format
function, which nearly matches the pattern being matched. This will cause the regular expression matching to take a long time, all the while occupying the event loop and preventing it from processing other requests and making the server unavailable (a Denial of Service attack).
Disclosure Timeline
- October 19th, 2016 - Reported the issue to package owner.
- October 19th, 2016 - Issue acknowledged by package owner.
- October 24th, 2016 - Issue fixed and version
2.15.2
released.
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:
- CCC
- CC+C
- C+CC
- 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.
References
medium severity
- Vulnerable module: node-fetch
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3, tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › isomorphic-fetch@2.2.1 › node-fetch@1.7.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › isomorphic-fetch@2.2.1 › node-fetch@1.7.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › topcoder-app-r@https://github.com/appirio-tech/topcoder-app-r.git#0.0.2 › isomorphic-fetch@2.2.1 › node-fetch@1.7.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › isomorphic-fetch@2.2.1 › node-fetch@1.7.3
…and 1 more
Overview
node-fetch is a light-weight module that brings window.fetch to node.js
Affected versions of this package are vulnerable to Denial of Service. Node Fetch did not honor the size
option after following a redirect, which means that when a content size was over the limit, a FetchError would never get thrown and the process would end without failure.
Remediation
Upgrade node-fetch
to version 2.6.1, 3.0.0-beta.9 or higher.
References
medium severity
- Vulnerable module: yargs-parser
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › yargs@4.8.1 › yargs-parser@2.4.1
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:
- It could be used for privilege escalation.
- 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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “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
- Vulnerable module: auth0-js
- Introduced through: auth0-js@6.8.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › auth0-js@6.8.4Remediation: Upgrade to auth0-js@8.12.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › auth0-js@6.8.4
Overview
auth0-js
is a Client Side Javascript toolkit for Auth0 API.
A cross-origin vulnerability has been discovered in the Auth0 auth0.js library affecting versions < 8.12. This vulnerability allows an attacker to acquire authenticated user's tokens and invoke services on a user's behalf if the target site or application uses a popup callback page with auth0.popup.callback()
.
References
medium severity
- Vulnerable module: angular
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Denial of Service (DoS). None
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 angular
to version 1.6.3 or higher.
References
medium severity
- Vulnerable module: angular
- Introduced through: angular-filter@0.5.16, angular-ui-router@0.4.2 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-filter@0.5.16 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-ui-router@0.4.2 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › appirio-tech-ng-work-constants@0.0.1 › angular@1.8.3
…and 6 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) by providing a custom locale rule that makes it possible to assign the parameter in posPre: ' '.repeat()
of NUMBER_FORMATS.PATTERNS[1].posPre
with a very high value.
Note:
This package has been deprecated and is no longer maintained.
The vulnerable versions are 1.7.0 and higher.
PoC:
class AppCtrl {
constructor($locale, $timeout) {
'ngInject';
const ctrl = this;
ctrl.currencySymbol = '$';
ctrl.amount = 100;
ctrl.posPre = $locale.NUMBER_FORMATS.PATTERNS[1].posPre;
ctrl.onPosPreChange = () => {
$locale.NUMBER_FORMATS.PATTERNS[1].posPre = ctrl.posPre;
const amount = ctrl.amount;
ctrl.amount = 0;
$timeout(() => (ctrl.amount = amount));
};
ctrl.onReDos = () => {
ctrl.currencySymbol = '';
ctrl.posPre = ' '.repeat(1000000);
$locale.NUMBER_FORMATS.PATTERNS[1].posPre = ctrl.posPre;
};
}
}
export default AppCtrl;
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:
- CCC
- CC+C
- C+CC
- 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 fixed version for angular
.
References
medium severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, angular-filter@0.5.16 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-filter@0.5.16 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-ui-router@0.4.2 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › appirio-tech-ng-work-constants@0.0.1 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 10 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the angular.copy()
utility function due to the usage of an insecure regular expression.
Exploiting this vulnerability is possible by a large carefully-crafted input, which can result in catastrophic backtracking.
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:
- CCC
- CC+C
- C+CC
- 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 fixed version for angular
.
References
medium severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, angular-filter@0.5.16 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-filter@0.5.16 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-ui-router@0.4.2 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › appirio-tech-ng-work-constants@0.0.1 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 10 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the $resource
service due to the usage of an insecure regular expression.
Exploiting this vulnerability is possible by a large carefully-crafted input, which can result in catastrophic backtracking.
PoC
The vulnerability manifests itself when the $resource
service is used with a URL that contains a large number of slashes followed by a non-slash character (for example, /some/url/////.../////foo
):
$resource('/some/url/${manySlashesFollowedByNonSlash}`).query();
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:
- CCC
- CC+C
- C+CC
- 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 fixed version for angular
.
References
medium severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, angular-filter@0.5.16 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-filter@0.5.16 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-ui-router@0.4.2 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › appirio-tech-ng-work-constants@0.0.1 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 10 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the <input type="url">
element due to the usage of an insecure regular expression in the input[url]
functionality.
Exploiting this vulnerability is possible by a large carefully-crafted input, which can result in catastrophic backtracking.
PoC
The vulnerability manifests itself when a <input type="url">
element is filled with an invalid URL consisting of any scheme followed by a large number of slashes (for example, http://///.../////
):
<input type="url" ng-model="urlWithManySlashes" />
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:
- CCC
- CC+C
- C+CC
- 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 fixed version for angular
.
References
medium severity
- Vulnerable module: axios
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.1
Overview
axios is a promise-based HTTP client for the browser and Node.js.
Affected versions of this package are vulnerable to Denial of Service (DoS) due to content continuing to be accepted from requests after maxContentLength
is exceeded.
PoC
require('axios').get(
'https://upload.wikimedia.org/wikipedia/commons/f/fe/A_Different_Slant_on_Carina.jpg',
{ maxContentLength: 2000 }
)
.then(d => console.log('done'))
.catch(e => console.log(e.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 axios
to version 0.18.1 or higher.
References
medium severity
- Vulnerable module: axios
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.1
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:
- CCC
- CC+C
- C+CC
- 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
- Vulnerable module: follow-redirects
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.1 › follow-redirects@0.0.7
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
- Vulnerable module: html-minifier
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and html-webpack-plugin@2.30.1
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › html-minifier@1.5.0
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › html-webpack-plugin@2.30.1 › html-minifier@3.5.21
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › html-webpack-plugin@2.30.1 › html-minifier@3.5.21
Overview
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) through the value
parameter of the minify
function. This vulnerability derives from the usage of insecure regular expression in reCustomIgnore
.
PoC
const { minify } = require('html-minifier');
const testReDoS = (repeatCount) => {
const input = '\t'.repeat(repeatCount) + '.\t1x';
const startTime = performance.now();
try {
minify(input);
} catch (e) {
console.error('Error during minification:', e);
}
const endTime = performance.now();
console.log(`Input length: ${repeatCount} - Processing time: ${endTime - startTime} ms`);
};
for (let i = 5000; i <= 60000; i += 5000) {
testReDoS(i);
}
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:
- CCC
- CC+C
- C+CC
- 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 fixed version for html-minifier
.
References
medium severity
- Vulnerable module: loader-utils
- Introduced through: html-webpack-plugin@2.30.1 and appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › html-webpack-plugin@2.30.1 › loader-utils@0.2.17Remediation: Upgrade to html-webpack-plugin@4.0.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › html-webpack-plugin@2.30.1 › loader-utils@0.2.17
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › loader-utils@0.2.17
Overview
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the resourcePath
variable in interpolateName.js
.
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:
- CCC
- CC+C
- C+CC
- 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 loader-utils
to version 1.4.2, 2.0.4, 3.2.1 or higher.
References
medium severity
- Vulnerable module: loader-utils
- Introduced through: html-webpack-plugin@2.30.1 and appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › html-webpack-plugin@2.30.1 › loader-utils@0.2.17Remediation: Upgrade to html-webpack-plugin@4.0.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › html-webpack-plugin@2.30.1 › loader-utils@0.2.17
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › react-svg-loader@1.1.1 › loader-utils@0.2.17
Overview
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in interpolateName
function via the URL
variable.
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:
- CCC
- CC+C
- C+CC
- 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 loader-utils
to version 1.4.2, 2.0.4, 3.2.1 or higher.
References
medium severity
- Vulnerable module: lodash
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and lodash@4.17.4
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › normalizr@1.4.1 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › lodash@4.17.4Remediation: Upgrade to lodash@4.17.21.
Overview
lodash is a modern JavaScript utility library delivering modularity, performance, & extras.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the toNumber
, trim
and trimEnd
functions.
POC
var lo = require('lodash');
function build_blank (n) {
var ret = "1"
for (var i = 0; i < n; i++) {
ret += " "
}
return ret + "1";
}
var s = build_blank(50000)
var time0 = Date.now();
lo.trim(s)
var time_cost0 = Date.now() - time0;
console.log("time_cost0: " + time_cost0)
var time1 = Date.now();
lo.toNumber(s)
var time_cost1 = Date.now() - time1;
console.log("time_cost1: " + time_cost1)
var time2 = Date.now();
lo.trimEnd(s)
var time_cost2 = Date.now() - time2;
console.log("time_cost2: " + time_cost2)
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:
- CCC
- CC+C
- C+CC
- 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 lodash
to version 4.17.21 or higher.
References
medium severity
- Vulnerable module: moment
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › moment@2.10.6Remediation: Open PR to patch moment@2.10.6.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › moment@2.10.6Remediation: Open PR to patch moment@2.10.6.
Overview
moment
is a lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
An attacker can provide a long value to the duration
function, which nearly matches the pattern being matched. This will cause the regular expression matching to take a long time, all the while occupying the event loop and preventing it from processing other requests and making the server unavailable (a Denial of Service attack).
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:
- CCC
- CC+C
- C+CC
- 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 moment
to version 2.11.2
or greater.
References
medium severity
- Vulnerable module: uglify-js
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and html-webpack-plugin@2.30.1
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › html-minifier@1.5.0 › uglify-js@2.6.4
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › html-webpack-plugin@2.30.1 › html-minifier@3.5.21 › uglify-js@3.4.10Remediation: Upgrade to html-webpack-plugin@4.0.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › html-webpack-plugin@2.30.1 › html-minifier@3.5.21 › uglify-js@3.4.10
Overview
uglify-js is a JavaScript parser, minifier, compressor and beautifier toolkit.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the string_template
and the decode_template
functions.
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:
- CCC
- CC+C
- C+CC
- 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 uglify-js
to version 3.14.3 or higher.
References
medium severity
- Vulnerable module: xml2js
- Introduced through: xml2js@0.4.17
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › xml2js@0.4.17Remediation: Upgrade to xml2js@0.5.0.
Overview
Affected versions of this package are vulnerable to Prototype Pollution due to allowing an external attacker to edit or add new properties to an object. This is possible because the application does not properly validate incoming JSON keys, thus allowing the __proto__
property to be edited.
PoC
var parseString = require('xml2js').parseString;
let normal_user_request = "<role>admin</role>";
let malicious_user_request = "<__proto__><role>admin</role></__proto__>";
const update_user = (userProp) => {
// A user cannot alter his role. This way we prevent privilege escalations.
parseString(userProp, function (err, user) {
if(user.hasOwnProperty("role") && user?.role.toLowerCase() === "admin") {
console.log("Unauthorized Action");
} else {
console.log(user?.role[0]);
}
});
}
update_user(normal_user_request);
update_user(malicious_user_request);
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 mergeProperty 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
Freeze the prototype— use
Object.freeze (Object.prototype)
.Require schema validation of JSON input.
Avoid using unsafe recursive merge functions.
Consider using objects without prototypes (for example,
Object.create(null)
), breaking the prototype chain and preventing pollution.As a best practice use
Map
instead ofObject
.
For more information on this vulnerability type:
Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018
Remediation
Upgrade xml2js
to version 0.5.0 or higher.
References
medium severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, appirio-tech-ng-ui-components@2.2.4 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5Remediation: Upgrade to angular@1.8.0.
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 1 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS). The regex-based input HTML replacement may turn sanitized code into unsanitized one.
Wrapping <option>
elements in <select>
ones changes parsing behavior, leading to possibly unsanitizing code.
Details
A cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <
can be coded as <
; and >
can be coded as >
; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <
and >
as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
Type | Origin | Description |
---|---|---|
Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?
,&
,/
,<
,>
and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
Upgrade angular
to version 1.8.0 or higher.
References
medium severity
- Vulnerable module: lodash
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 and lodash@4.17.4
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › normalizr@1.4.1 › lodash@3.10.1
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › lodash@4.17.4Remediation: Upgrade to lodash@4.17.11.
Overview
lodash is a modern JavaScript utility library delivering modularity, performance, & extras.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). It parses dates using regex strings, which may cause a slowdown of 2 seconds per 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:
- CCC
- CC+C
- C+CC
- 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 lodash
to version 4.17.11 or higher.
References
medium severity
- Vulnerable module: angular
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS)
via the SVG <use>
element.
The <use>
element can reference external SVG's (same origin) and can include xlink:href
javascript urls or foreign object that can execute XSS. The change disallows <use>
elements in sanitized SVG markup.
An example of a malicious SVG document would be:
SVG to sanitize:
<svg><use xlink:href="test.svg#xss" /></svg>
External SVG file (test.svg):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" width="100"
height="100"
id="xss">
<a xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="javascript:alert(1)">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</a>
</svg>
Here the SVG to sanitize loads in the test.svg
file via the <use>
element. The sanitizer is not able to parse this file, which contains malicious executable mark-up.
This can only be taken advantage of if the external file is available via the
same origin restrictions in place.
Details
Remediation
Upgrade angular
to version 1.5.0-rc.0 or higher.
References
medium severity
- Vulnerable module: angular
- Introduced through: appirio-tech-ng-ui-components@2.2.4 and tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS)
due to the usemap
attribute not being blacklisted.
Details
Remediation
Upgrade angular
to version 1.5.0-rc.2 or higher.
References
medium severity
- Vulnerable module: angular
- Introduced through: angular@1.6.5, angular-filter@0.5.16 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular@1.6.5
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-filter@0.5.16 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › angular-ui-router@0.4.2 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular-ui-router@0.2.18 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › ngreact@0.2.0 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › appirio-tech-ng-work-constants@0.0.1 › angular@1.8.3
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-auth@4.2.6 › angular@1.4.14
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › angular@1.4.14
…and 10 more
Overview
angular is a package that lets you write client-side web applications as if you had a smarter browser. It also lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) due to insecure page caching in the Internet Explorer browser, which allows interpolation of <textarea>
elements.
Details
A cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <
can be coded as <
; and >
can be coded as >
; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <
and >
as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
Type | Origin | Description |
---|---|---|
Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?
,&
,/
,<
,>
and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
There is no fixed version for angular
.
References
low severity
- Vulnerable module: clean-css
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › html-webpack-plugin@1.7.0 › html-minifier@1.5.0 › clean-css@3.4.28
Overview
clean-css is a fast and efficient CSS optimizer for Node.js platform and any modern browser.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). attacks. This can cause an impact of about 10 seconds matching time for data 70k characters long.
Disclosure Timeline
- Feb 15th, 2018 - Initial Disclosure to package owner
- Feb 20th, 2018 - Initial Response from package owner
- Mar 6th, 2018 - Fix issued
- Mar 7th, 2018 - Vulnerability published
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:
- CCC
- CC+C
- C+CC
- 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 clean-css
to version 4.1.11 or higher.
References
low severity
- Vulnerable module: moment
- Introduced through: appirio-tech-ng-ui-components@2.2.4, tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 and others
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-ng-ui-components@2.2.4 › moment@2.10.6
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › tc-accounts@https://github.com/appirio-tech/accounts-app.git#0.0.7 › appirio-tech-ng-ui-components@2.2.5 › moment@2.10.6
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › moment@2.18.1Remediation: Upgrade to moment@2.19.3.
Overview
moment is a lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). It used a regular expression (/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i
) in order to parse dates specified as strings. This can cause a very low impact of about 2 seconds matching time for data 50k characters long.
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:
- CCC
- CC+C
- C+CC
- 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 moment
to version 2.19.3 or higher.
References
low severity
- Vulnerable module: follow-redirects
- Introduced through: appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3
Detailed paths
-
Introduced through: topcoder-app@appirio-tech/topcoder-app#85564156bdf5de528e8765b96a665d3f37a458bd › appirio-tech-react-components@appirio-tech/react-components.git#listings-release-v3 › appirio-tech-client-app-layer@0.1.3 › axios@0.8.1 › follow-redirects@0.0.7
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.