Vulnerabilities

7 via 18 paths

Dependencies

433

Source

GitHub

Find, fix and prevent vulnerabilities in your code.

Severity
  • 1
  • 6
Status
  • 7
  • 0
  • 0

critical severity
new

Interpretation Conflict

  • Vulnerable module: @fastify/middie
  • Introduced through: @nestjs/platform-fastify@12.6.3

Detailed paths

  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @nestjs/platform-fastify@12.6.3 › @fastify/middie@9.3.9

Overview

@fastify/middie is a Middleware engine for Fastify

Affected versions of this package are vulnerable to Interpretation Conflict via joinPrefix when a route or mount path is written without a leading slash inside a plugin registered under a prefix. Fastify concatenates such a path directly onto the prefix (e.g. get('secret') under /api is served at /apisecret), while @fastify/middie inserts a separating slash, mounting the middleware at /api/secret. A request to /apisecret therefore reaches the route handler without executing the middleware, allowing an attacker to bypass authentication or other middleware-based access controls on the affected routes.

Note: This is only exploitable when route or mount paths are written without a leading slash inside a prefixed plugin.

Remediation

Upgrade @fastify/middie to version 9.3.10 or higher.

References

medium severity

Asymmetric Resource Consumption (Amplification)

  • Vulnerable module: minimatch
  • Introduced through: @testcontainers/redis@12.2.2 and @opentelemetry/auto-instrumentations-node@0.82.0

Detailed paths

  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @testcontainers/redis@12.2.2 › testcontainers@12.2.2 › archiver@7.0.1 › archiver-utils@5.0.2 › glob@10.5.0 › minimatch@9.0.9
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @opentelemetry/auto-instrumentations-node@0.82.0 › @opentelemetry/resource-detector-gcp@0.59.0 › gcp-metadata@8.1.4 › gaxios@7.1.3 › rimraf@5.0.10 › glob@10.5.0 › minimatch@9.0.9
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @testcontainers/redis@12.2.2 › testcontainers@12.2.2 › archiver@7.0.1 › zip-stream@6.0.1 › archiver-utils@5.0.2 › glob@10.5.0 › minimatch@9.0.9
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @testcontainers/redis@12.2.2 › testcontainers@12.2.2 › archiver@7.0.1 › readdir-glob@1.1.3 › minimatch@5.1.9

Overview

minimatch is a minimal matching utility.

Affected versions of this package are vulnerable to Asymmetric Resource Consumption (Amplification) in the firstPhasePreProcess method, where the **/.. transform clones a globParts entry and pushes the clone back onto the same array inside a do...while (didSomething) fixpoint loop. An attacker can exhaust CPU and memory by supplying a glob pattern whose **/.. sequences regenerate entries during preprocessing, which secondPhasePreProcess then compares in an O(n^2) pairwise partsMatch pass over the expanded set. Exploitation requires the pattern to be parsed with optimizationLevel set to 2 or higher.

Remediation

Upgrade minimatch to version 11.0.1 or higher.

References

medium severity
new

Incorrect Regular Expression

  • Vulnerable module: picomatch
  • Introduced through: typeorm@1.1.4

Detailed paths

  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › typeorm@1.1.4 › tinyglobby@0.2.17 › picomatch@4.0.7

Overview

Affected versions of this package are vulnerable to Incorrect Regular Expression via the globstar function in lib/parse.js, where globstar (**) patterns are compiled without the dotAll flag, causing the generated regular expression to use . which does not match line terminator characters. An attacker who controls file names, object keys, or archive entry names can embed newline characters in those names to evade **-based deny patterns, causing excluded resources to be included and exposed.

Remediation

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

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: glob
  • Introduced through: @testcontainers/redis@12.2.2 and @opentelemetry/auto-instrumentations-node@0.82.0

Detailed paths

  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @testcontainers/redis@12.2.2 › testcontainers@12.2.2 › archiver@7.0.1 › archiver-utils@5.0.2 › glob@10.5.0
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @opentelemetry/auto-instrumentations-node@0.82.0 › @opentelemetry/resource-detector-gcp@0.59.0 › gcp-metadata@8.1.4 › gaxios@7.1.3 › rimraf@5.0.10 › glob@10.5.0
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @testcontainers/redis@12.2.2 › testcontainers@12.2.2 › archiver@7.0.1 › zip-stream@6.0.1 › archiver-utils@5.0.2 › glob@10.5.0

Overview

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling in the walkCB, walkCB2, walkCBSync, and walkCB2Sync methods of src/walker.ts, where each abort branch calls cb() without returning. An attacker can keep a walk consuming filesystem I/O and CPU after it has already been aborted, by driving a traversal that the caller tries to bound, because execution continues past the abort into processPatterns(), readdirCB(), and recursive walkCB2() calls. This affects only callers that rely on the signal option or AbortSignal.timeout() to cancel a walk, and applies to both glob() and globStream().

Remediation

Upgrade glob to version 13.0.7, 14.0.2 or higher.

References

medium severity
new

Improper Neutralization

  • Vulnerable module: glob
  • Introduced through: @testcontainers/redis@12.2.2 and @opentelemetry/auto-instrumentations-node@0.82.0

Detailed paths

  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @testcontainers/redis@12.2.2 › testcontainers@12.2.2 › archiver@7.0.1 › archiver-utils@5.0.2 › glob@10.5.0
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @opentelemetry/auto-instrumentations-node@0.82.0 › @opentelemetry/resource-detector-gcp@0.59.0 › gcp-metadata@8.1.4 › gaxios@7.1.3 › rimraf@5.0.10 › glob@10.5.0
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @testcontainers/redis@12.2.2 › testcontainers@12.2.2 › archiver@7.0.1 › zip-stream@6.0.1 › archiver-utils@5.0.2 › glob@10.5.0

Overview

Affected versions of this package are vulnerable to Improper Neutralization in src/ignore.ts, when composing an absolute ignore pattern, the resolved root/cwd path is pasted into a glob string and re-parsed by minimatch. The path is escaped with minimatch's escape(), but that function only escapes { and } when the magicalBraces option is enabled, which glob does not pass. A root or cwd path containing brace expressions (e.g. /root{7,8}) is therefore brace-expanded during re-parsing, causing the resulting ignore pattern to match non-existent paths instead of the real path. The exclusion is silently dropped and the excluded file is returned to the caller.

Note: This is only exploitable when the root or cwd path contains brace characters, which is reachable when those paths are derived from externally supplied data such as tenant IDs, project names, or archive extraction paths.

PoC

import { Volume, createFsFromVolume } from 'memfs'
import { glob } from 'glob'

const vol = new Volume()
const fs = createFsFromVolume(vol)
vol.fromJSON({
  '/root{7,8}/keep.txt': 'x',
  '/root{7,8}/skip.log': 'x',
})

const res = await glob('*', {
  cwd: '/root{7,8}',
  root: '/root{7,8}',
  fs,
  ignore: ['/skip.log'],
  platform: 'posix',
})

console.log(res)   // [ 'keep.txt', 'skip.log' ]  <-- skip.log should be ignored

Control with a plain root path:

vol.fromJSON({ '/root/keep.txt': 'x', '/root/skip.log': 'x' })
await glob('*', {
  cwd: '/root', root: '/root', fs, ignore: ['/skip.log'], platform: 'posix',
})
// [ 'keep.txt' ]  <-- ignore correctly enforced

Remediation

Upgrade glob to version 14.0.6 or higher.

References

medium severity
new

Improper Neutralization of Null Byte or NUL Character

  • Vulnerable module: pg-protocol
  • Introduced through: pg@8.23.1 and @opentelemetry/auto-instrumentations-node@0.82.0

Detailed paths

  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › pg@8.23.1 › pg-protocol@1.16.1
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @opentelemetry/auto-instrumentations-node@0.82.0 › @opentelemetry/instrumentation-pg@0.77.0 › @types/pg@8.15.6 › pg-protocol@1.16.1
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @opentelemetry/auto-instrumentations-node@0.82.0 › @opentelemetry/instrumentation-pg@0.77.0 › @types/pg-pool@2.0.7 › @types/pg@8.23.1 › pg-protocol@1.16.1

Overview

pg-protocol is a The postgres client/server binary protocol, implemented in TypeScript

Affected versions of this package are vulnerable to Improper Neutralization of Null Byte or NUL Character in the startup function of the StartupMessage serializer. An attacker who can influence a connection parameter value, such as database, application_name, or options, can embed a NUL byte in it to split the parameter's value early, shifting the parsing of every subsequent key and value pair and effectively injecting an attacker-chosen server parameter such as search_path. This requires the calling application to pass that attacker-influenced value into a connection parameter without stripping NUL bytes first, a pattern seen in multi-tenant setups that select the database per request or set application_name from user-supplied data.

Remediation

There is no fixed version for pg-protocol.

References

medium severity
new

Improper Encoding or Escaping of Output

  • Vulnerable module: minimatch
  • Introduced through: @testcontainers/redis@12.2.2 and @opentelemetry/auto-instrumentations-node@0.82.0

Detailed paths

  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @testcontainers/redis@12.2.2 › testcontainers@12.2.2 › archiver@7.0.1 › archiver-utils@5.0.2 › glob@10.5.0 › minimatch@9.0.9
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @opentelemetry/auto-instrumentations-node@0.82.0 › @opentelemetry/resource-detector-gcp@0.59.0 › gcp-metadata@8.1.4 › gaxios@7.1.3 › rimraf@5.0.10 › glob@10.5.0 › minimatch@9.0.9
  • Introduced through: nest-boilerplate@MarkNjunge/nest-boilerplate › @testcontainers/redis@12.2.2 › testcontainers@12.2.2 › archiver@7.0.1 › zip-stream@6.0.1 › archiver-utils@5.0.2 › glob@10.5.0 › minimatch@9.0.9

Overview

minimatch is a minimal matching utility.

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via minimatch.escape() in src/escape.ts, which fails to neutralize four classes of special input before the result is used as a glob pattern. A leading ! passes through unescaped and becomes a negation operator, causing the pattern to match every path except the intended literal. A leading # passes through and becomes a comment, causing the pattern to match nothing. When the escaped output is combined with a brace group (either caller-supplied or present in the user text itself), brace-expansion collapses the \\ escape sequence and reactivates the following magic character (such as *), widening the match. With { windowsPathsNoEscape: true, magicalBraces: true }, brace-literal encoding using character classes ([{]) is misinterpreted by brace-expansion, producing patterns that match unintended strings and fail to match the intended literal. Applications that pass attacker-controlled text through escape() and use the result for authorization, filtering, or path-selection decisions may grant or deny access to unintended paths.

Workaround

Until upgrading, the following per-behavior mitigations can be applied (each measured on 11.0.5):

  • Behaviors 1 and 2 (leading ! and #): pass { nonegate: true, nocomment: true } when matching escaped patterns.
  • Behavior 3 (escaped backslash plus brace group): do not combine escaped text with a brace group, and use { magicalBraces: true } so user braces are escaped. Alternatively, pass nobrace: true to stop the over-match, but note that the caller's brace group then also becomes literal.
  • Behavior 4 (windowsPathsNoEscape + magicalBraces): pass nobrace: true when matching.

Remediation

Upgrade minimatch to version 11.0.8 or higher.

References