Vulnerabilities

37 via 53 paths

Dependencies

618

Source

GitHub

Commit

b18f8187

Find, fix and prevent vulnerabilities in your code.

Issue type
  • 37
  • 8
Severity
  • 2
  • 14
  • 26
  • 3
Status
  • 45
  • 0
  • 0

critical severity

Arbitrary Code Injection

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.0.5.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Arbitrary Code Injection via unsafe deserialization of RSC payloads from HTTP requests to Server Function endpoints. An unauthenticated attacker can execute arbitrary code on the server by sending malicious HTTP requests.

Note:

Serverless applications and applications that do not use a framework, bundler, or bundler plugin that supports React Server Components are not affected by this vulnerability.

Next.js 13.x, Next.js 14.x stable, Pages Router applications, and the Edge Runtime are not affected.

This vulnerability originates in the upstream React implementation. This advisory tracks the downstream impact on Next.js applications using the App Router.

CVE-2025-66478 was originally announced for this vulnerability and later rejected as a duplicate of CVE-2025-55182.

Remediation

Upgrade next to version 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7 or higher.

References

critical severity

Improper Authorization

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.2.3.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Improper Authorization due to the improper handling of the x-middleware-subrequest header. An attacker can bypass authorization checks by sending crafted requests containing this specific header.

Workaround

This can be mitigated by preventing external user requests which contain the x-middleware-subrequest header from reaching your Next.js application.

Remediation

Upgrade next to version 12.3.5, 13.5.9, 14.2.25, 15.2.3, 15.3.0-canary.12 or higher.

References

high severity
new

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: wait-on@6.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e wait-on@6.0.1 axios@0.25.0
    Remediation: Upgrade to wait-on@7.2.0.

Overview

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

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

PoC

import axios from "axios";

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

Details

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

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

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

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

merge (target, source)

  foreach property of source

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

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

    else

      target[property] = source[property]

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

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

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

Property definition by path

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

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

Types of attacks

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

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

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

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

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

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

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

For more information on this vulnerability type:

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

Remediation

Upgrade axios to version 0.30.3, 1.13.5 or higher.

References

high severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: cross-spawn
  • Introduced through: @blitzjs/manypkg@0.19.1 and @changesets/cli@2.22.0

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 spawndamnit@2.0.0 cross-spawn@5.1.0
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @changesets/cli@2.22.0 spawndamnit@2.0.0 cross-spawn@5.1.0
    Remediation: Upgrade to @changesets/cli@2.27.10.
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @changesets/cli@2.22.0 @changesets/git@1.5.0 spawndamnit@2.0.0 cross-spawn@5.1.0
    Remediation: Upgrade to @changesets/cli@2.27.0.
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @changesets/cli@2.22.0 @changesets/apply-release-plan@6.1.4 @changesets/git@2.0.0 spawndamnit@2.0.0 cross-spawn@5.1.0
    Remediation: Upgrade to @changesets/cli@2.27.0.
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @changesets/cli@2.22.0 @changesets/read@0.5.9 @changesets/git@2.0.0 spawndamnit@2.0.0 cross-spawn@5.1.0
    Remediation: Upgrade to @changesets/cli@2.27.0.
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @changesets/cli@2.22.0 @changesets/get-release-plan@3.0.17 @changesets/read@0.5.9 @changesets/git@2.0.0 spawndamnit@2.0.0 cross-spawn@5.1.0
    Remediation: Upgrade to @changesets/cli@2.27.0.

Overview

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper input sanitization. An attacker can increase the CPU usage and crash the program by crafting a very large and well crafted string.

PoC

const { argument } = require('cross-spawn/lib/util/escape');
var str = "";
for (var i = 0; i < 1000000; i++) {
  str += "\\";
}
str += "◎";

console.log("start")
argument(str)
console.log("end")

// run `npm install cross-spawn` and `node attack.js` 
// then the program will stuck forever with high CPU usage

Details

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

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

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

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

This regular expression accomplishes the following:

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

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

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

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

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

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

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

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

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

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

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

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

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

Remediation

Upgrade cross-spawn to version 6.0.6, 7.0.5 or higher.

References

high severity
new

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: minimatch
  • Introduced through: eslint@8.27.0, pretty-quick@3.1.3 and others

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e eslint@8.27.0 minimatch@3.1.2
    Remediation: Upgrade to eslint@10.0.0.
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e eslint@8.27.0 @eslint/eslintrc@1.4.1 minimatch@3.1.2
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e eslint@8.27.0 @humanwhocodes/config-array@0.11.14 minimatch@3.1.2
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e pretty-quick@3.1.3 multimatch@4.0.0 minimatch@3.1.2
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 get-workspaces@0.6.0 globby@9.2.0 glob@7.2.3 minimatch@3.1.2
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e eslint@8.27.0 file-entry-cache@6.0.1 flat-cache@3.2.0 rimraf@3.0.2 glob@7.2.3 minimatch@3.1.2
    Remediation: Upgrade to eslint@9.0.0.

Overview

minimatch is a minimal matching utility.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in the AST class, caused by catastrophic backtracking when an input string contains many * characters in a row, followed by an unmatched character.

Details

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

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

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

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

This regular expression accomplishes the following:

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

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

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

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

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

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

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

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

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

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

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

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

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

Remediation

Upgrade minimatch to version 10.2.1 or higher.

References

high severity

Deserialization of Untrusted Data

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.0.6.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Deserialization of Untrusted Data due to unsafe deserialization of payloads from HTTP requests to Server Function endpoints. An attacker can cause the server process to enter an infinite loop and hang, preventing it from serving future HTTP requests by sending specially crafted payloads.

Notes:

Even if your app does not implement any React Server Function endpoints it may still be vulnerable if your app supports React Server Components.

If your app’s React code does not use a server, your app is not affected by these vulnerabilities. If your app does not use a framework, bundler, or bundler plugin that supports React Server Components, your app is not affected by these vulnerabilities.

For React Native users not using a monorepo or react-dom, your react version should be pinned in your package.json, and there are no additional steps needed.

If you are using React Native in a monorepo, you should update only the impacted packages if they are installed: react-server-dom-webpack, react-server-dom-parcel, react-server-dom-turbopack. This is required to mitigate the security advisories, but you do not need to update react and react-dom so this will not cause the version mismatch error in React Native. See this issue for more information.

Details

Serialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like Remote Method Invocation (RMI), Java Management Extension (JMX), Java Messaging System (JMS), Action Message Format (AMF), Java Server Faces (JSF) ViewState, etc.

Deserialization of untrusted data (CWE-502) is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, thus allowing the attacker to control the state or the flow of the execution.

Remediation

Upgrade next to version 14.2.34, 15.0.6, 15.1.10, 15.2.7, 15.3.7, 15.4.9, 15.5.8, 16.0.9, 16.1.0-canary.19 or higher.

References

high severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.4.2.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the resolve-routes. An attacker can access internal resources and potentially exfiltrate sensitive information by crafting requests containing user-controlled headers (e.g., Location) that are forwarded or interpreted without validation.

Note: This is only exploitable if custom middleware logic is implemented in a self-hosted deployment. The project maintainers recommend using the documented NextResponse.next({request}) to explicitly pass the request object.

Remediation

Upgrade next to version 14.2.32, 15.4.2-canary.43, 15.4.7 or higher.

References

high severity
new

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: ajv
  • Introduced through: eslint@8.27.0

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e eslint@8.27.0 ajv@6.12.6
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e eslint@8.27.0 @eslint/eslintrc@1.4.1 ajv@6.12.6

Overview

ajv is an Another JSON Schema Validator

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper validation of the pattern keyword when combined with $data references. An attacker can cause the application to become unresponsive and exhaust CPU resources by submitting a specially crafted regular expression payload.

Note:

This is only exploitable if the $data option is enabled.

PoC

const Ajv = require('ajv');

// Vulnerable configuration — $data enables runtime pattern injection
const ajv = new Ajv({ $data: true });

const schema = {
  type: 'object',
  properties: {
    pattern: { type: 'string' },
    value: {
      type: 'string',
      pattern: { $data: '1/pattern' }  // Pattern comes from the data itself
    }
  }
};

const validate = ajv.compile(schema);

// Malicious payload — both the pattern and the triggering input
const maliciousPayload = {
  pattern: '^(a|a)*$',           // Catastrophic backtracking pattern
  value: 'a'.repeat(30) + 'X'    // 30 'a's followed by 'X' to force full backtracking
};

console.time('attack');
validate(maliciousPayload);       // Blocks the entire Node.js process for ~44 seconds
console.timeEnd('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:

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

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

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

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

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

Remediation

Upgrade ajv to version 8.18.0 or higher.

References

high severity
new

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.5.10.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the fetchExternalImage() function, which is used for image optimization and loads external images into memory without a maximum size limit. An attacker can exhaust system memory and disrupt service availability by requesting optimization of very large images from external domains.

Note:

This is only exploitable if remotePatterns is configured to allow image optimization from external domains and the attacker can serve or control a large image on an allowed domain.

Remediation

Upgrade next to version 15.5.10, 16.1.1-canary.15, 16.1.5 or higher.

References

high severity
new

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@16.1.5.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the Partial Prerendering resume endpoint when unauthenticated POST requests with the Next-Resume: 1 header are processed and attacker-controlled postponed state data is handled. An attacker can cause the server process to crash and exhaust system memory by sending large or highly compressed payloads that are buffered or decompressed without size limits.

Note:

This is only exploitable if the application is running with experimental.ppr: true or cacheComponents: true configured along with the NEXT_PRIVATE_MINIMAL_MODE=1 environment variable.

Remediation

Upgrade next to version 15.6.0-canary.61, 16.1.1-canary.16, 16.1.5 or higher.

References

high severity

Incorrect Authorization

  • Vulnerable module: vite
  • Introduced through: vitest@0.25.3

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e vitest@0.25.3 vite@3.2.11
    Remediation: Upgrade to vitest@0.25.7.

Overview

vite is a Native-ESM powered web dev build tool

Affected versions of this package are vulnerable to Incorrect Authorization due to missing checks in transformMiddleware() which ignore certain query parameters. An attacker can access unauthorized files by including a ?raw?? or ?import&raw?? URL parameter. The allow list used by server.fs.deny() is not checked when handling these queries and the file contents are returned.

Note: The dev server is configured by default to be inaccessible. This is only exploitable if the dev server is exposed to the network with either the --host command line option or server.host config option.

PoC


$ echo "top secret content" > /tmp/secret.txt

# expected behavior
$ curl "http://localhost:5173/@fs/tmp/secret.txt"

    <body>
      <h1>403 Restricted</h1>
      <p>The request url &quot;/tmp/secret.txt&quot; is outside of Vite serving allow list.

# security bypassed
$ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw??"
export default "top secret content\n"

Remediation

Upgrade vite to version 4.5.10, 5.4.15, 6.0.12, 6.1.2, 6.2.3 or higher.

References

high severity

Incorrect Authorization

  • Vulnerable module: vite
  • Introduced through: vitest@0.25.3

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e vitest@0.25.3 vite@3.2.11
    Remediation: Upgrade to vitest@0.25.7.

Overview

vite is a Native-ESM powered web dev build tool

Affected versions of this package are vulnerable to Incorrect Authorization via the bypass of the server.fs.deny restriction. An attacker can access restricted files by appending ?.svg with ?.wasm?init or with sec-fetch-dest: script header to the requests.

Note:

This is only exploitable if the file is smaller than the build.assetsInlineLimit (default: 4kB), when using Vite 6.0+ and when the Vite dev server is explicitly exposed to the network (using --host or server.host config option.

PoC

npm create vite@latest
cd vite-project/
npm install
npm run dev

send request to read etc/passwd

curl 'http://127.0.0.1:5173/etc/passwd?.svg?.wasm?init'
curl 'http://127.0.0.1:5173/@fs/x/x/x/vite-project/?/../../../../../etc/passwd?import&?raw'

Remediation

Upgrade vite to version 4.5.12, 5.4.17, 6.0.14, 6.1.4, 6.2.5 or higher.

References

high severity

Excessive Platform Resource Consumption within a Loop

  • Vulnerable module: braces
  • Introduced through: @blitzjs/manypkg@0.19.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 get-workspaces@0.6.0 globby@9.2.0 fast-glob@2.2.7 micromatch@3.1.10 braces@2.3.2

Overview

braces is a Bash-like brace expansion, implemented in JavaScript.

Affected versions of this package are vulnerable to Excessive Platform Resource Consumption within a Loop due improper limitation of the number of characters it can handle, through the parse function. An attacker can cause the application to allocate excessive memory and potentially crash by sending imbalanced braces as input.

PoC

const { braces } = require('micromatch');

console.log("Executing payloads...");

const maxRepeats = 10;

for (let repeats = 1; repeats <= maxRepeats; repeats += 1) {
  const payload = '{'.repeat(repeats*90000);

  console.log(`Testing with ${repeats} repeats...`);
  const startTime = Date.now();
  braces(payload);
  const endTime = Date.now();
  const executionTime = endTime - startTime;
  console.log(`Regex executed in ${executionTime / 1000}s.\n`);
} 

Remediation

Upgrade braces to version 3.0.3 or higher.

References

high severity

Prototype Pollution

  • Vulnerable module: unset-value
  • Introduced through: @blitzjs/manypkg@0.19.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 get-workspaces@0.6.0 globby@9.2.0 fast-glob@2.2.7 micromatch@3.1.10 snapdragon@0.8.2 base@0.11.2 cache-base@1.0.1 unset-value@1.0.0
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 get-workspaces@0.6.0 globby@9.2.0 fast-glob@2.2.7 micromatch@3.1.10 braces@2.3.2 snapdragon@0.8.2 base@0.11.2 cache-base@1.0.1 unset-value@1.0.0
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 get-workspaces@0.6.0 globby@9.2.0 fast-glob@2.2.7 micromatch@3.1.10 extglob@2.0.4 snapdragon@0.8.2 base@0.11.2 cache-base@1.0.1 unset-value@1.0.0
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 get-workspaces@0.6.0 globby@9.2.0 fast-glob@2.2.7 micromatch@3.1.10 nanomatch@1.2.13 snapdragon@0.8.2 base@0.11.2 cache-base@1.0.1 unset-value@1.0.0
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 get-workspaces@0.6.0 globby@9.2.0 fast-glob@2.2.7 micromatch@3.1.10 extglob@2.0.4 expand-brackets@2.1.4 snapdragon@0.8.2 base@0.11.2 cache-base@1.0.1 unset-value@1.0.0

Overview

Affected versions of this package are vulnerable to Prototype Pollution via the unset function in index.js, because it allows access to object prototype properties.

Details

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

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

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

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

merge (target, source)

  foreach property of source

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

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

    else

      target[property] = source[property]

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

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

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

Property definition by path

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

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

Types of attacks

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

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

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

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

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

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

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

For more information on this vulnerability type:

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

Remediation

Upgrade unset-value to version 2.0.1 or higher.

References

high severity

Cross-site Request Forgery (CSRF)

  • Vulnerable module: axios
  • Introduced through: wait-on@6.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e wait-on@6.0.1 axios@0.25.0
    Remediation: Upgrade to wait-on@7.2.0.

Overview

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

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

Workaround

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

Remediation

Upgrade axios to version 0.28.0, 1.6.0 or higher.

References

high severity

GPL-2.0 license

  • Module: smartwrap
  • Introduced through: @changesets/cli@2.22.0

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @changesets/cli@2.22.0 tty-table@2.8.13 smartwrap@1.2.5

GPL-2.0 license

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: axios
  • Introduced through: wait-on@6.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e wait-on@6.0.1 axios@0.25.0
    Remediation: Upgrade to wait-on@7.2.0.

Overview

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

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

Remediation

Upgrade axios to version 1.12.0 or higher.

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.1.2.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling through the Server Actions process. An attacker can cause the server to hang by constructing requests that leave Server-Actions requests pending until the hosting provider terminates the function execution.

Note:

This is only exploitable if there are no protections against long-running Server Action invocations.

Remediation

Upgrade next to version 13.5.8, 14.2.21, 15.1.2 or higher.

References

medium severity

Exposure of Sensitive System Information to an Unauthorized Control Sphere

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.0.6.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Exposure of Sensitive System Information to an Unauthorized Control Sphere. An attacker can access the source code of any Server Function by sending a malicious HTTP request to a vulnerable Server Function.

Notes:

This is only exploitable if a Server Function exists that explicitly or implicitly exposes a stringified argument:

'use server';

export async function serverFunction(name) {
  const conn = db.createConnection('SECRET KEY');
  const user = await conn.createUser(name); // implicitly stringified, leaked in db

  return {
   id: user.id,
   message: `Hello, ${name}!` // explicitly stringified, leaked in reply
  }}

An attacker may be able to leak the following:

0:{"a":"$@1","f":"","b":"Wy43RxUKdxmr5iuBzJ1pN"}
1:{"id":"tva1sfodwq","message":"Hello, async function(a){console.log(\"serverFunction\");let b=i.createConnection(\"SECRET KEY\");return{id:(await b.createUser(a)).id,message:`Hello, ${a}!`}}!"}

Secrets hardcoded in source code may be exposed, but runtime secrets such as process.env.SECRET are not affected.

The scope of the exposed code is limited to the code inside the Server Function, which may include other functions depending on the amount of inlining your bundler provides.

Even if your app does not implement any React Server Function endpoints it may still be vulnerable if your app supports React Server Components.

If your app’s React code does not use a server, your app is not affected by these vulnerabilities. If your app does not use a framework, bundler, or bundler plugin that supports React Server Components, your app is not affected by these vulnerabilities.

For React Native users not using a monorepo or react-dom, your react version should be pinned in your package.json, and there are no additional steps needed.

If you are using React Native in a monorepo, you should update only the impacted packages if they are installed: react-server-dom-webpack, react-server-dom-parcel, react-server-dom-turbopack. This is required to mitigate the security advisories, but you do not need to update react and react-dom so this will not cause the version mismatch error in React Native. See this issue for more information.

Remediation

Upgrade next to version 15.0.6, 15.1.10, 15.2.7, 15.3.7, 15.4.9, 15.5.8, 16.0.9, 16.1.0-canary.19 or higher.

References

medium severity

Origin Validation Error

  • Vulnerable module: vite
  • Introduced through: vitest@0.25.3

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e vitest@0.25.3 vite@3.2.11
    Remediation: Upgrade to vitest@0.25.7.

Overview

vite is a Native-ESM powered web dev build tool

Affected versions of this package are vulnerable to Origin Validation Error due to default CORS settings and lack of validation on the Origin header for WebSocket connections, making any websites able to send any requests to the development server and read the response. An attacker can intercept and manipulate requests by sending crafted WebSocket requests from unauthorized origins.

Note:

Additionally to upgrading to a fixed version, the following configurations need to be made to fix the vulnerability:

  1. If the backend integration feature is used and server.origin is not set, the origin of the backend server needs to be added to the server.cors.origin option. Make sure to set a specific origin rather than *, otherwise any origin can access your development server;

  2. If a reverse proxy is used in front of Vite and requests are sent to Vite with a hostname other than localhost or *.localhost, the hostname needs to be added to the new server.allowedHosts option. For example, if the reverse proxy is sending requests to http://vite:5173, vite needs to be added to the server.allowedHosts option;

  3. If the development server is accessed via a domain other than localhost or *.localhost the hostname needs to be added to the new server.allowedHosts option. For example, if you are accessing the development server via http://foo.example.com:8080, you need to add foo.example.com to the server.allowedHosts option;

  4. If a plugin / framework is used that connects to the WebSocket server on their own from the browser and the WebSocket connection appears not to be working after upgrading to a fixed version, it is recommended to either fix the plugin / framework code to the make it compatible with the new version or to set legacy.skipWebSocketTokenCheck: true to opt-out the fix for "Lack of validation on the Origin header for WebSocket connections" while the plugin / framework is incompatible with the new version of Vite. When enabling this option, make sure that you are aware of the security implications of this vulnerability.

Workaround

This vulnerability can be partially mitigated by:

  1. Setting server.cors to false or limiting server.cors.origin to trusted origins;

  2. Using Chrome 94+ or using HTTPS for the development server.

PoC

  1. Use the react template which utilizes HMR functionality:
npm create vite@latest my-vue-app-react -- --template react
  1. On a malicious server, serve the following POC html:
<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>vite CSWSH</title>
    </head>
    <body>
        <div id="logs"></div>
        <script>
            const div = document.querySelectorAll('#logs')[0];
            const ws = new WebSocket('ws://localhost:5173','vite-hmr');
            ws.onmessage = event => {
                const logLine = document.createElement('p');
                logLine.innerHTML = event.data;
                div.append(logLine);
            };
        </script>
    </body>
</html>
  1. Kick off Vite:
npm run dev
  1. Load the development server (open http://localhost:5173/) as well as the malicious page in the browser;

  2. Edit src/App.jsx file and intentionally place a syntax error;

  3. Notice how the malicious page can view the websocket messages and a snippet of the source code is exposed.

Remediation

Upgrade vite to version 4.5.6, 5.4.12, 6.0.9 or higher.

References

medium severity

Symlink Attack

  • Vulnerable module: tmp
  • Introduced through: @changesets/cli@2.22.0

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @changesets/cli@2.22.0 external-editor@3.1.0 tmp@0.0.33

Overview

Affected versions of this package are vulnerable to Symlink Attack via the dir parameter. An attacker can cause files or directories to be written to arbitrary locations by supplying a crafted symbolic link that resolves outside the intended temporary directory.

PoC

const tmp = require('tmp');

const tmpobj = tmp.fileSync({ 'dir': 'evil-dir'});
console.log('File: ', tmpobj.name);

try {
    tmp.fileSync({ 'dir': 'mydir1'});
} catch (err) {
    console.log('test 1:', err.message)
}

try {
    tmp.fileSync({ 'dir': '/foo'});
} catch (err) {
    console.log('test 2:', err.message)
}

try {
    const fs = require('node:fs');
    const resolved = fs.realpathSync('/tmp/evil-dir');
    tmp.fileSync({ 'dir': resolved});
} catch (err) {
    console.log('test 3:', err.message)
}

Remediation

Upgrade tmp to version 0.2.4 or higher.

References

medium severity

Race Condition

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.1.6.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Race Condition in the Pages Router. An attacker can cause the server to serve incorrect pageProps data instead of the expected HTML content by exploiting a race condition between two requests, one containing the ?__nextDataRequest=1 query parameter and another with the x-now-route-matches header.

Notes:

  1. This is only exploitable if the CDN provider caches a 200 OK response even in the absence of explicit cache-control headers, enabling a poisoned response to persist and be served to subsequent users;

  2. No backend access or privileged escalation is possible through this vulnerability;

  3. Applications hosted on Vercel's platform are not affected by this issue, as the platform does not cache responses based solely on 200 OK status without explicit cache-control headers.

  4. This is a bypass of the fix for CVE-2024-46982

Workaround

This can be mitigated by stripping the x-now-route-matches header from all incoming requests at your CDN and setting cache-control: no-store for all responses under risk.

Remediation

Upgrade next to version 14.2.24, 15.1.6 or higher.

References

medium severity

Use of Cache Containing Sensitive Information

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.4.2.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Use of Cache Containing Sensitive Information in the image optimization process, when responses from API routes vary based on request headers such as Cookie or Authorization. An attacker can gain unauthorized access to sensitive image data by exploiting cache key confusion, causing responses intended for authenticated users to be served to unauthorized users.

Note: Exploitation requires a prior authorized request to populate the cache.

Remediation

Upgrade next to version 14.2.31, 15.4.2-canary.19, 15.4.5 or higher.

References

medium severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: wait-on@6.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e wait-on@6.0.1 axios@0.25.0
    Remediation: Upgrade to wait-on@7.2.0.

Overview

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

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

PoC

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

Remediation

Upgrade axios to version 0.30.0, 1.8.2 or higher.

References

medium severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: wait-on@6.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e wait-on@6.0.1 axios@0.25.0
    Remediation: Upgrade to wait-on@7.2.0.

Overview

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

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

Remediation

Upgrade axios to version 0.30.0, 1.8.3 or higher.

References

medium severity

Missing Release of Resource after Effective Lifetime

  • Vulnerable module: inflight
  • Introduced through: @blitzjs/manypkg@0.19.1 and eslint@8.27.0

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 get-workspaces@0.6.0 globby@9.2.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e eslint@8.27.0 file-entry-cache@6.0.1 flat-cache@3.2.0 rimraf@3.0.2 glob@7.2.3 inflight@1.0.6

Overview

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

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

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

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

PoC

const inflight = require('inflight');

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

    setImmediate(scheduleNext);
  }


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

  scheduleNext();
}

testInflight();

Remediation

There is no fixed version for inflight.

References

medium severity

Directory Traversal

  • Vulnerable module: vite
  • Introduced through: vitest@0.25.3

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e vitest@0.25.3 vite@3.2.11
    Remediation: Upgrade to vitest@0.34.4.

Overview

vite is a Native-ESM powered web dev build tool

Affected versions of this package are vulnerable to Directory Traversal via the server.fs.deny function. An attacker can access restricted files by appending a backslash to the URL when the development server is running on Windows and is explicitly exposed to the network.

Note: This is only exploitable if the server is explicitly exposed to the network using the command line parameter --host or the config option server.host.

PoC

npm create vite@latest
cd vite-project/
cat "secret" > .env
npm install
npm run dev
curl --request-target /.env\ http://localhost:5173

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 vite to version 5.4.21, 6.4.1, 7.0.8, 7.1.11 or higher.

References

medium severity

Directory Traversal

  • Vulnerable module: vite
  • Introduced through: vitest@0.25.3

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e vitest@0.25.3 vite@3.2.11
    Remediation: Upgrade to vitest@0.25.7.

Overview

vite is a Native-ESM powered web dev build tool

Affected versions of this package are vulnerable to Directory Traversal through the server.fs.deny configuration due to improper input sanitization. An attacker can bypass server.fs.deny with /. for files under project root and access sensitive files by manipulating path traversal sequences.

Note:

This is only exploitable if the application is explicitly exposing the Vite dev server to the network (using --host or server.host config option). Only files that are under project root and are denied by a file matching pattern can be bypassed.

PoC

npm create vite@latest
cd vite-project/
cat "secret" > .env
npm install
npm run dev
curl --request-target /.env/. http://localhost:5173

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 vite to version 4.5.14, 5.4.19, 6.1.6, 6.2.7, 6.3.4 or higher.

References

medium severity

Information Exposure

  • Vulnerable module: vite
  • Introduced through: vitest@0.25.3

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e vitest@0.25.3 vite@3.2.11
    Remediation: Upgrade to vitest@0.25.7.

Overview

vite is a Native-ESM powered web dev build tool

Affected versions of this package are vulnerable to Information Exposure due to the handling of req.url which may contain unexpected characters such as #. An attacker can access and retrieve the contents of arbitrary files by sending specially crafted requests that bypass the server.fs.deny checks.

Note:

This is only exploitable if the Vite dev server is explicitly exposed to the network and running on Node or Bun runtimes, excluding Deno.

PoC

npm create vite@latest
cd vite-project/
npm install
npm run dev

send request to read /etc/passwd

curl --request-target /@fs/Users/doggy/Desktop/vite-project/#/../../../../../etc/passwd http://127.0.0.1:5173

Remediation

Upgrade vite to version 4.5.13, 5.4.18, 6.0.15, 6.1.5, 6.2.6 or higher.

References

medium severity

Access Control Bypass

  • Vulnerable module: vite
  • Introduced through: vitest@0.25.3

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e vitest@0.25.3 vite@3.2.11
    Remediation: Upgrade to vitest@0.25.7.

Overview

vite is a Native-ESM powered web dev build tool

Affected versions of this package are vulnerable to Access Control Bypass through the server.fs.deny configuration, which is bypassed when using ?import query with inline and raw parameters. An attacker can read arbitrary files and return their content if they exist by crafting a URL that includes specific query parameters.

Remediation

Upgrade vite to version 4.5.11, 5.4.16, 6.0.13, 6.1.3, 6.2.4 or higher.

References

medium severity

Open Redirect

  • Vulnerable module: got
  • Introduced through: @blitzjs/manypkg@0.19.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 package-json@6.5.0 got@9.6.0

Overview

Affected versions of this package are vulnerable to Open Redirect due to missing verification of requested URLs. It allowed a victim to be redirected to a UNIX socket.

Remediation

Upgrade got to version 11.8.5, 12.1.0 or higher.

References

medium severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: axios
  • Introduced through: wait-on@6.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e wait-on@6.0.1 axios@0.25.0
    Remediation: Upgrade to wait-on@7.2.0.

Overview

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

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

PoC

const axios = require('axios');

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

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


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

Details

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

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

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

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

This regular expression accomplishes the following:

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

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

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

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

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

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

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

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

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

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

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

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

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

Remediation

Upgrade axios to version 0.29.0, 1.6.3 or higher.

References

medium severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: glob-parent
  • Introduced through: @blitzjs/manypkg@0.19.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 get-workspaces@0.6.0 globby@9.2.0 fast-glob@2.2.7 glob-parent@3.1.0

Overview

glob-parent is a package that helps extracting the non-magic parent path from a glob string.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). The enclosure regex used to check for strings ending in enclosure containing path separator.

PoC by Yeting Li

var globParent = require("glob-parent")
function build_attack(n) {
var ret = "{"
for (var i = 0; i < n; i++) {
ret += "/"
}

return ret;
}

globParent(build_attack(5000));

Details

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

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

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

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

This regular expression accomplishes the following:

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

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

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

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

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

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

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

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

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

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

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

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

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

Remediation

Upgrade glob-parent to version 5.1.2 or higher.

References

medium severity

Inefficient Regular Expression Complexity

  • Vulnerable module: micromatch
  • Introduced through: @blitzjs/manypkg@0.19.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e @blitzjs/manypkg@0.19.1 get-workspaces@0.6.0 globby@9.2.0 fast-glob@2.2.7 micromatch@3.1.10

Overview

Affected versions of this package are vulnerable to Inefficient Regular Expression Complexity due to the use of unsafe pattern configurations that allow greedy matching through the micromatch.braces() function. An attacker can cause the application to hang or slow down by passing a malicious payload that triggers extensive backtracking in regular expression processing.

Remediation

Upgrade micromatch to version 4.0.8 or higher.

References

medium severity
new

Uncontrolled Recursion

  • Vulnerable module: eslint
  • Introduced through: eslint@8.27.0

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e eslint@8.27.0
    Remediation: Upgrade to eslint@9.26.0.

Overview

eslint is a pluggable linting utility for JavaScript and JSX

Affected versions of this package are vulnerable to Uncontrolled Recursion in the isSerializable function when handling objects with circular references during the serialization process. An attacker can cause the application to crash or become unresponsive by supplying specially crafted input that triggers infinite recursion.

Remediation

Upgrade eslint to version 9.26.0 or higher.

References

medium severity

MPL-2.0 license

  • Module: turbo
  • Introduced through: turbo@1.10.9

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e turbo@1.10.9

MPL-2.0 license

medium severity

MPL-2.0 license

  • Module: turbo-darwin-64
  • Introduced through: turbo@1.10.9

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e turbo@1.10.9 turbo-darwin-64@1.10.9

MPL-2.0 license

medium severity

MPL-2.0 license

  • Module: turbo-darwin-arm64
  • Introduced through: turbo@1.10.9

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e turbo@1.10.9 turbo-darwin-arm64@1.10.9

MPL-2.0 license

medium severity

MPL-2.0 license

  • Module: turbo-linux-64
  • Introduced through: turbo@1.10.9

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e turbo@1.10.9 turbo-linux-64@1.10.9

MPL-2.0 license

medium severity

MPL-2.0 license

  • Module: turbo-linux-arm64
  • Introduced through: turbo@1.10.9

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e turbo@1.10.9 turbo-linux-arm64@1.10.9

MPL-2.0 license

medium severity

MPL-2.0 license

  • Module: turbo-windows-64
  • Introduced through: turbo@1.10.9

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e turbo@1.10.9 turbo-windows-64@1.10.9

MPL-2.0 license

medium severity

MPL-2.0 license

  • Module: turbo-windows-arm64
  • Introduced through: turbo@1.10.9

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e turbo@1.10.9 turbo-windows-arm64@1.10.9

MPL-2.0 license

low severity

Missing Origin Validation in WebSockets

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.2.2.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Missing Origin Validation in WebSockets when running next dev and the project uses the App Router. An attacker can access the source code of client components by exploiting the Cross-site WebSocket hijacking (CSWSH) attack when a user visits a malicious link while having the server running locally.

Workarounds

  1. Avoid browsing untrusted websites while running the local development server.

  2. Implement local firewall or proxy rules to block unauthorized WebSocket access to localhost.

Remediation

Upgrade next to version 14.2.30, 15.2.2 or higher.

References

low severity

Missing Source Correlation of Multiple Independent Data

  • Vulnerable module: next
  • Introduced through: next@15.0.1

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e next@15.0.1
    Remediation: Upgrade to next@15.4.2.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Missing Source Correlation of Multiple Independent Data in image-optimizer. An attacker can cause arbitrary files to be downloaded with attacker-controlled content and filenames by supplying malicious external image sources.

Note: This is only exploitable if the application is configured to allow external image sources via the images.domains or images.remotePatterns configuration.

Remediation

Upgrade next to version 14.2.31, 15.4.2-canary.19, 15.4.5 or higher.

References

low severity

Relative Path Traversal

  • Vulnerable module: vite
  • Introduced through: vitest@0.25.3

Detailed paths

  • Introduced through: blitz-root@blitz-js/blitz#b18f81873e641934043f791fec06e22f5fe5a86e vitest@0.25.3 vite@3.2.11
    Remediation: Upgrade to vitest@0.34.4.

Overview

vite is a Native-ESM powered web dev build tool

Affected versions of this package are vulnerable to Relative Path Traversal via improper enforcement of server.fs settings. An attacker can access arbitrary HTML files on the server by sending crafted requests to the preview server.

Note: This is only exploitable if the server is explicitly exposed to the network using the --host flag or the server.host configuration option, and the application uses appType set to 'spa' (default) or 'mpa'.

Remediation

Upgrade vite to version 5.4.20, 6.3.6, 7.0.7, 7.1.5 or higher.

References