Vulnerabilities

6 via 13 paths

Dependencies

630

Source

GitHub

Commit

eb0f74fa

Find, fix and prevent vulnerabilities in your code.

Issue type
  • 6
  • 1
Severity
  • 4
  • 2
  • 1
Status
  • 7
  • 0
  • 0

high severity
new

Arbitrary Code Injection

  • Vulnerable module: lodash
  • Introduced through: html-webpack-plugin@5.6.6 and react-resize-detector@8.1.0

Detailed paths

  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 html-webpack-plugin@5.6.6 lodash@4.18.1
  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 react-resize-detector@8.1.0 lodash@4.18.1
  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 html-webpack-plugin@5.6.6 pretty-error@4.0.0 lodash@4.18.1
  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 html-webpack-plugin@5.6.6 pretty-error@4.0.0 renderkid@3.0.0 lodash@4.18.1

Overview

lodash is a modern JavaScript utility library delivering modularity, performance, & extras.

Affected versions of this package are vulnerable to Arbitrary Code Injection due the improper validation of options.imports key names in _.template. An attacker can execute arbitrary code at template compilation time by injecting malicious expressions. If Object.prototype has been polluted, inherited properties may also be copied into the imports object and executed.

Notes:

  1. Version 4.18.0 was intended to fix this vulnerability but it got deprecated due to introducing a breaking functionality issue.

  2. This issue is due to the incomplete fix for CVE-2021-23337.

Remediation

There is no fixed version for lodash.

References

high severity
new

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: serialize-javascript
  • Introduced through: copy-webpack-plugin@11.0.0

Detailed paths

  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 copy-webpack-plugin@11.0.0 serialize-javascript@6.0.2
    Remediation: Upgrade to copy-webpack-plugin@14.0.0.

Overview

serialize-javascript is a package to serialize JavaScript to a superset of JSON that includes regular expressions and functions.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling through the serialize function when handling specially crafted array-like objects with a very large length property. An attacker can cause excessive CPU consumption and make the application unresponsive by submitting such objects for serialization.

Note: While direct exploitation is difficult, it becomes a high-priority threat if the environment is also vulnerable to prototype pollution or insecure YAML deserialization.

Remediation

Upgrade serialize-javascript to version 7.0.5 or higher.

References

high severity

Arbitrary Code Injection

  • Vulnerable module: serialize-javascript
  • Introduced through: copy-webpack-plugin@11.0.0

Detailed paths

  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 copy-webpack-plugin@11.0.0 serialize-javascript@6.0.2
    Remediation: Upgrade to copy-webpack-plugin@14.0.0.

Overview

serialize-javascript is a package to serialize JavaScript to a superset of JSON that includes regular expressions and functions.

Affected versions of this package are vulnerable to Arbitrary Code Injection. An object like {"foo": /1"/, "bar": "a\"@__R-<UID>-0__@"} would be serialized as {"foo": /1"/, "bar": "a\/1"/}, meaning an attacker could escape out of bar if they controlled both foo and bar and were able to guess the value of <UID>. UID is generated once on startup, is chosen using Math.random() and has a keyspace of roughly 4 billion, so within the realm of an online attack.

PoC

eval('('+ serialize({"foo": /1" + console.log(1)/i, "bar": '"@__R-<UID>-0__@'}) + ')');

Remediation

Upgrade serialize-javascript to version 7.0.3 or higher.

References

high severity

GPL-2.0 license

  • Module: tinymce
  • Introduced through: @tinymce/tinymce-react@5.1.1

Detailed paths

  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 @tinymce/tinymce-react@5.1.1 tinymce@7.9.2

GPL-2.0 license

medium severity
new

Prototype Pollution

  • Vulnerable module: lodash
  • Introduced through: html-webpack-plugin@5.6.6 and react-resize-detector@8.1.0

Detailed paths

  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 html-webpack-plugin@5.6.6 lodash@4.18.1
  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 react-resize-detector@8.1.0 lodash@4.18.1
  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 html-webpack-plugin@5.6.6 pretty-error@4.0.0 lodash@4.18.1
  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 html-webpack-plugin@5.6.6 pretty-error@4.0.0 renderkid@3.0.0 lodash@4.18.1

Overview

lodash is a modern JavaScript utility library delivering modularity, performance, & extras.

Affected versions of this package are vulnerable to Prototype Pollution via the _.unset and _.omit functions. An attacker can delete properties from built-in prototypes by supplying array-wrapped path segments, potentially impacting application behaviour.

Notes:

  1. Version 4.18.0 was intended to fix this vulnerability but it got deprecated due to introducing a breaking functionality issue.

  2. This issue is due to incomplete fix for CVE-2025-13465 which protects only against string key members.

Details

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

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

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

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

merge (target, source)

  foreach property of source

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

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

    else

      target[property] = source[property]

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

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

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

Property definition by path

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

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

Types of attacks

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

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

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

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

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

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

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

For more information on this vulnerability type:

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

Remediation

There is no fixed version for lodash.

References

medium severity

Use of a Cryptographic Primitive with a Risky Implementation

  • Vulnerable module: elliptic
  • Introduced through: crypto-browserify@3.12.1

Detailed paths

  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 crypto-browserify@3.12.1 browserify-sign@4.2.5 elliptic@6.6.1
  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 crypto-browserify@3.12.1 create-ecdh@4.0.4 elliptic@6.6.1

Overview

elliptic is a fast elliptic-curve cryptography implementation in plain javascript.

Affected versions of this package are vulnerable to Use of a Cryptographic Primitive with a Risky Implementation due to the incorrect computation of the byte-length of k value with leading zeros resulting in its truncation. An attacker can obtain the secret key by analyzing both a faulty signature generated by a vulnerable implementation and a correct signature for the same inputs.

Note:

There is a distinct but related issue CVE-2024-48948.

Remediation

There is no fixed version for elliptic.

References

low severity

Directory Traversal

  • Vulnerable module: sirv
  • Introduced through: webpack-bundle-analyzer@4.10.2

Detailed paths

  • Introduced through: jammusic@WebJamApps/JaMmusic#eb0f74fa9249c5247938a08c6b300ec8fa5667d6 webpack-bundle-analyzer@4.10.2 sirv@2.0.4
    Remediation: Upgrade to webpack-bundle-analyzer@5.2.0.

Overview

sirv is a The optimized & lightweight middleware for serving requests to static assets

Affected versions of this package are vulnerable to Directory Traversal via the viaLocal function, which uses a dirname prefix. An attacker can access files outside the intended public directory by sending crafted requests that exploit symlinks and naming similarities, bypassing access restrictions.

Note: This is only exploitable if the server is explicitly exposed to the network using the --host flag or the server.host configuration option, the public directory feature is enabled, and there are symlinks in a public directory.

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 sirv to version 3.0.2 or higher.

References