Vulnerabilities |
13 via 46 paths |
|---|---|
Dependencies |
393 |
Source |
GitHub |
Find, fix and prevent vulnerabilities in your code.
critical severity
- Vulnerable module: shescape
- Introduced through: @snyk/snyk-cocoapods-plugin@3.1.1, @snyk/snyk-hex-plugin@2.2.1 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-cocoapods-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-cocoapods-plugin@3.1.2.
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-hex-plugin@2.2.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-hex-plugin@2.2.3.
-
Introduced through: snyk@snyk/snyk › snyk-sbt-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to snyk-sbt-plugin@3.1.3.
Overview
shescape is a simple shell escape library
Affected versions of this package are vulnerable to Command Injection via the getEscapeFunction function when using the escape or escapeAll APIs on Windows with shell set to cmd.exe, or with shell set to true when CMD is the default. An attacker can execute arbitrary commands by supplying specially crafted arguments that break out of a parenthesized CMD construct and inject shell syntax.
Remediation
Upgrade shescape to version 2.1.14, 3.0.1 or higher.
References
critical severity
- Vulnerable module: shescape
- Introduced through: @snyk/snyk-cocoapods-plugin@3.1.1, @snyk/snyk-hex-plugin@2.2.1 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-cocoapods-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-cocoapods-plugin@3.1.2.
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-hex-plugin@2.2.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-hex-plugin@2.2.3.
-
Introduced through: snyk@snyk/snyk › snyk-sbt-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to snyk-sbt-plugin@3.1.3.
Overview
shescape is a simple shell escape library
Affected versions of this package are vulnerable to Improper Neutralization via the escape or escapeAll APIs when processing untrusted input containing parentheses on Windows systems configured to use CMD as the shell. An attacker can execute arbitrary commands by injecting specially crafted input that is not properly escaped. This is only exploitable if the application is running on Windows and explicitly configures the shell to CMD or relies on CMD as the default shell.
Workaround
This vulnerability can be mitigated by removing all instances of ( and ) from untrusted inputs.
Remediation
Upgrade shescape to version 2.1.14, 3.0.1 or higher.
References
high severity
- Vulnerable module: braces
- Introduced through: micromatch@4.0.8, snyk-nodejs-lockfile-parser@2.10.5 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › micromatch@4.0.8 › braces@3.0.3
-
Introduced through: snyk@snyk/snyk › snyk-nodejs-lockfile-parser@2.10.5 › micromatch@4.0.8 › braces@3.0.3
-
Introduced through: snyk@snyk/snyk › snyk-nodejs-plugin@2.2.1 › micromatch@4.0.8 › braces@3.0.3
-
Introduced through: snyk@snyk/snyk › @snyk/code-client@4.26.2 › fast-glob@3.3.3 › micromatch@4.0.8 › braces@3.0.3
-
Introduced through: snyk@snyk/snyk › snyk-docker-plugin@9.21.2 › snyk-nodejs-lockfile-parser@2.10.5 › micromatch@4.0.8 › braces@3.0.3
-
Introduced through: snyk@snyk/snyk › snyk-nodejs-plugin@2.2.1 › snyk-nodejs-lockfile-parser@2.10.4 › micromatch@4.0.8 › braces@3.0.3
Overview
braces is a Bash-like brace expansion, implemented in JavaScript.
Affected versions of this package are vulnerable to Uncontrolled Recursion in the recursive AST walkers, which lack depth guards. An attacker can supply deeply nested brace patterns that stay within the character limit to exhaust the call stack and crash the Node.js process with an uncaught RangeError.
Remediation
There is no fixed version for braces.
References
high severity
new
- Vulnerable module: picomatch
- Introduced through: micromatch@4.0.8, snyk-nodejs-lockfile-parser@2.10.5 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › micromatch@4.0.8 › picomatch@2.3.2
-
Introduced through: snyk@snyk/snyk › snyk-nodejs-lockfile-parser@2.10.5 › micromatch@4.0.8 › picomatch@2.3.2
-
Introduced through: snyk@snyk/snyk › snyk-nodejs-plugin@2.2.1 › micromatch@4.0.8 › picomatch@2.3.2
-
Introduced through: snyk@snyk/snyk › @snyk/code-client@4.26.2 › fast-glob@3.3.3 › micromatch@4.0.8 › picomatch@2.3.2
-
Introduced through: snyk@snyk/snyk › snyk-docker-plugin@9.21.2 › snyk-nodejs-lockfile-parser@2.10.5 › micromatch@4.0.8 › picomatch@2.3.2
-
Introduced through: snyk@snyk/snyk › snyk-nodejs-plugin@2.2.1 › snyk-nodejs-lockfile-parser@2.10.4 › micromatch@4.0.8 › picomatch@2.3.2
Overview
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via analyzeRepeatedExtglob in lib/parse.js, which skips single-branch repeated extglob patterns such as +(*) or +(*a). An attacker can supply these glob patterns to trigger exponential backtracking in the underlying regular expression engine against short inputs, blocking the Node.js event loop and crashing the application.
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:
AThe 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.DFinally, we ensure this section of the string ends with a 'D'
The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD
It most cases, it doesn't take very long for a regex engine to find a match:
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total
The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.
Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.
Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:
- CCC
- CC+C
- C+CC
- C+C+C.
The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.
From there, the number of steps the engine must use to validate a string just continues to grow.
| String | Number of C's | Number of steps |
|---|---|---|
| ACCCX | 3 | 38 |
| ACCCCX | 4 | 71 |
| ACCCCCX | 5 | 136 |
| ACCCCCCCCCCCCCCX | 14 | 65,553 |
By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.
Remediation
There is no fixed version for picomatch.
References
high severity
- Vulnerable module: shescape
- Introduced through: @snyk/snyk-cocoapods-plugin@3.1.1, @snyk/snyk-hex-plugin@2.2.1 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-cocoapods-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-cocoapods-plugin@3.1.2.
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-hex-plugin@2.2.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-hex-plugin@2.2.3.
-
Introduced through: snyk@snyk/snyk › snyk-sbt-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to snyk-sbt-plugin@3.1.3.
Overview
shescape is a simple shell escape library
Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via improper escaping in the getEscapeFunction function. An attacker can access sensitive home-directory information and potentially alter the target location of commands by supplying crafted input such as :~ when the escape or escapeAll APIs are used on Unix systems with the shell set to dash, or with shell set to true when Dash is the default, and the result is interpolated into an assignment prefixed to a command.
Remediation
Upgrade shescape to version 2.1.14, 3.0.1 or higher.
References
medium severity
- Vulnerable module: shescape
- Introduced through: @snyk/snyk-cocoapods-plugin@3.1.1, @snyk/snyk-hex-plugin@2.2.1 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-cocoapods-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-cocoapods-plugin@3.1.2.
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-hex-plugin@2.2.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-hex-plugin@2.2.3.
-
Introduced through: snyk@snyk/snyk › snyk-sbt-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to snyk-sbt-plugin@3.1.3.
Overview
shescape is a simple shell escape library
Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output in the escape function. An attacker can cause unintended expansion of shell arguments by supplying input containing square brackets, which may result in multiple filesystem matches being processed instead of a single literal argument. This can lead to changes in command behavior, targeting of unintended files, or exposure of filenames when the output is used in shell commands.
PoC
tmp=$(mktemp -d)
cd "$tmp"
npm pack shescape@2.1.9 >/dev/null
mkdir pkg
tar -xzf shescape-2.1.9.tgz -C pkg
cd pkg/package
npm install --omit=dev
node --input-type=module - <<'NODE'
import { mkdtempSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import path from "node:path";
import { execSync } from "node:child_process";
import { Shescape } from "./src/index.js";
const dir = mkdtempSync(path.join(tmpdir(), "shescape-ghsa-poc-"));
writeFileSync(path.join(dir, "secret1"), "");
writeFileSync(path.join(dir, "secret2"), "");
for (const shell of ["/usr/bin/bash", "/usr/bin/dash"]) {
const shescape = new Shescape({ shell });
const escaped = shescape.escape("secret[12]");
console.log(${shell} escaped=${escaped});
const out = execSync(printf '<%s>\\n' ${escaped}, { cwd: dir, shell }).toString();
process.stdout.write(out);
}
NODE
Remediation
Upgrade shescape to version 2.1.10 or higher.
References
medium severity
new
- Vulnerable module: adm-zip
- Introduced through: adm-zip@0.6.1, snyk-cpp-plugin@2.24.6 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › adm-zip@0.6.1
-
Introduced through: snyk@snyk/snyk › snyk-cpp-plugin@2.24.6 › adm-zip@0.6.1
-
Introduced through: snyk@snyk/snyk › snyk-docker-plugin@9.21.2 › adm-zip@0.6.1
Overview
adm-zip is a JavaScript implementation for zip data compression for NodeJS.
Affected versions of this package are vulnerable to Interpretation Conflict via canonically equivalent ZIP entry names (e.g., ./hello.txt and hello.txt), which causes readEntries() to treat them as distinct entries while extractAllTo() resolves them to the same filesystem path. An attacker can craft a ZIP archive where getEntry() or readAsText() validates benign content from one entry while extractAllTo() subsequently writes malicious content from a duplicate entry to the same path, bypassing integrity checks.
Remediation
There is no fixed version for adm-zip.
References
medium severity
- Vulnerable module: shescape
- Introduced through: @snyk/snyk-cocoapods-plugin@3.1.1, @snyk/snyk-hex-plugin@2.2.1 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-cocoapods-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-cocoapods-plugin@3.1.2.
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-hex-plugin@2.2.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-hex-plugin@2.2.3.
-
Introduced through: snyk@snyk/snyk › snyk-sbt-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to snyk-sbt-plugin@3.1.3.
Overview
shescape is a simple shell escape library
Affected versions of this package are vulnerable to Command Injection in the escape and escapeAll functions when used on Unix systems with the shell explicitly configured to Zsh, or when the default shell is Zsh. An attacker can obtain lists of files and directories on the system by leveraging home directory expansion and extended glob syntax.
Note: This is only exploitable if the shell is set to Zsh and the Zsh options EXTENDED_GLOB and MAGIC_EQUAL_SUBST are enabled.
Remediation
Upgrade shescape to version 2.1.14, 3.0.1 or higher.
References
medium severity
- Vulnerable module: shescape
- Introduced through: @snyk/snyk-cocoapods-plugin@3.1.1, @snyk/snyk-hex-plugin@2.2.1 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-cocoapods-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-cocoapods-plugin@3.1.2.
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-hex-plugin@2.2.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-hex-plugin@2.2.3.
-
Introduced through: snyk@snyk/snyk › snyk-sbt-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to snyk-sbt-plugin@3.1.3.
Overview
shescape is a simple shell escape library
Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output in the escape or escapeAll process when used with the shell option set to Dash or when the default shell is Dash. An attacker can obtain the user's home directory and potentially influence the location on which a command operates by supplying specially crafted input containing ~ characters. This is only exploitable if the application explicitly configures the shell option to Dash or relies on Dash as the default shell in assignment contexts.
Workaround
This vulnerability can be mitigated by refraining from using Dash, using the env option of the node:child_process API to inject variables with untrusted values, or removing all instances of ~ from untrusted inputs.
Remediation
Upgrade shescape to version 2.1.14, 3.0.1 or higher.
References
medium severity
- Vulnerable module: shescape
- Introduced through: @snyk/snyk-cocoapods-plugin@3.1.1, @snyk/snyk-hex-plugin@2.2.1 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-cocoapods-plugin@3.1.1 › shescape@2.1.6
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-hex-plugin@2.2.1 › shescape@2.1.6
-
Introduced through: snyk@snyk/snyk › snyk-sbt-plugin@3.1.1 › shescape@2.1.6
-
Introduced through: snyk@snyk/snyk › snyk-gradle-plugin@7.1.7 › shescape@2.1.14
-
Introduced through: snyk@snyk/snyk › snyk-python-plugin@3.3.4 › shescape@2.1.14
Overview
shescape is a simple shell escape library
Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via the getEscapeFunction logic in src/internal/unix/busybox.js. An attacker can reveal the user's home directory and alter how a command interprets an assignment-prefixed value by supplying input such as :~ or a=~ to escape or escapeAll when Unix shell escaping targets BusyBox sh. On affected Unix systems where shell is set to "sh" or true and /bin/sh points to BusyBox, the escaped tilde is expanded in assignment contexts instead of being treated as data, causing commands like V=...; echo $V to print : followed by the home path.
Remediation
Upgrade shescape to version 2.1.15, 3.0.2 or higher.
References
medium severity
- Vulnerable module: shescape
- Introduced through: @snyk/snyk-cocoapods-plugin@3.1.1, @snyk/snyk-hex-plugin@2.2.1 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-cocoapods-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-cocoapods-plugin@3.1.2.
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-hex-plugin@2.2.1 › shescape@2.1.6Remediation: Upgrade to @snyk/snyk-hex-plugin@2.2.3.
-
Introduced through: snyk@snyk/snyk › snyk-sbt-plugin@3.1.1 › shescape@2.1.6Remediation: Upgrade to snyk-sbt-plugin@3.1.3.
Overview
shescape is a simple shell escape library
Affected versions of this package are vulnerable to Improper Neutralization in the escape or escapeAll process when used with Zsh as the shell, especially if the Zsh options EXTENDED_GLOB or MAGIC_EQUAL_SUBST are enabled. An attacker can obtain sensitive information about files and directories by supplying crafted input that leverages home directory expansion or extended glob syntax. This is only exploitable if the application is configured to use Zsh as the shell and the relevant Zsh options are enabled.
Workaround
This vulnerability can be mitigated by refraining from using Zsh, disabling the EXTENDED_GLOB option, or removing all instances of ^, #, and ~ from untrusted inputs.
Remediation
Upgrade shescape to version 2.1.14, 3.0.1 or higher.
References
medium severity
- Vulnerable module: uuid
- Introduced through: snyk-docker-plugin@9.21.2 and snyk-python-plugin@3.3.4
Detailed paths
-
Introduced through: snyk@snyk/snyk › snyk-docker-plugin@9.21.2 › snyk-poetry-lockfile-parser@1.9.1 › @snyk/error-catalog-nodejs-public@4.0.4 › uuid@9.0.1
-
Introduced through: snyk@snyk/snyk › snyk-python-plugin@3.3.4 › snyk-poetry-lockfile-parser@1.10.1 › @snyk/error-catalog-nodejs-public@4.0.4 › uuid@9.0.1
Overview
uuid is a RFC4122 (v1, v4, and v5) compliant UUID library.
Affected versions of this package are vulnerable to Improper Validation of Specified Index, Position, or Offset in Input due to accepting external output buffers but not rejecting out-of-range writes (small buf or large offset). This inconsistency allows silent partial writes into caller-provided buffers.
PoC
cd /home/StrawHat/uuid
npm ci
npm run build
node --input-type=module -e "
import {v4,v5,v6} from './dist-node/index.js';
const ns='6ba7b810-9dad-11d1-80b4-00c04fd430c8';
for (const [name,fn] of [
['v4',()=>v4({},new Uint8Array(8),4)],
['v5',()=>v5('x',ns,new Uint8Array(8),4)],
['v6',()=>v6({},new Uint8Array(8),4)],
]) {
try { fn(); console.log(name,'NO_THROW'); }
catch(e){ console.log(name,'THREW',e.name); }
}"
Remediation
Upgrade uuid to version 11.1.1, 14.0.0 or higher.
References
medium severity
- Vulnerable module: inflight
- Introduced through: glob@7.2.3, rimraf@2.7.1 and others
Detailed paths
-
Introduced through: snyk@snyk/snyk › glob@7.2.3 › inflight@1.0.6
-
Introduced through: snyk@snyk/snyk › rimraf@2.7.1 › glob@7.2.3 › inflight@1.0.6
-
Introduced through: snyk@snyk/snyk › snyk-mvn-plugin@4.9.4 › 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
ignored
- Module: shescape
- Introduced through: @snyk/snyk-cocoapods-plugin@3.1.1, @snyk/snyk-hex-plugin@2.2.1 and others
-
Ignored path
∗
-
Expires
in 96 years
Reason
: --about lists all dependency licenses which is a requirement of MPL-2.0This issue was ignored via the project's .snyk policy file. To unignore it, update the policy file.
Detailed paths
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-cocoapods-plugin@3.1.1 › shescape@2.1.6
-
Introduced through: snyk@snyk/snyk › @snyk/snyk-hex-plugin@2.2.1 › shescape@2.1.6
-
Introduced through: snyk@snyk/snyk › snyk-sbt-plugin@3.1.1 › shescape@2.1.6
-
Introduced through: snyk@snyk/snyk › snyk-docker-plugin@9.21.2 › shescape@2.1.15
-
Introduced through: snyk@snyk/snyk › snyk-mvn-plugin@4.9.4 › shescape@2.1.15
-
Introduced through: snyk@snyk/snyk › snyk-gradle-plugin@7.1.7 › shescape@2.1.14
-
Introduced through: snyk@snyk/snyk › snyk-python-plugin@3.3.4 › shescape@2.1.14
MPL-2.0 license