| Affected_by_vulnerabilities |
| 0 |
| url |
VCID-8tmm-r9hx-t7gh |
| vulnerability_id |
VCID-8tmm-r9hx-t7gh |
| summary |
Cleartext Storage of Sensitive Information in an Environment Variable
Shescape is a simple shell escape library for JavaScript. An attacker may be able to get read-only access to environment variables. This bug has been patched in version 1.7.1. |
| references |
|
| fixed_packages |
|
| aliases |
CVE-2023-35931, GHSA-3g7p-8qhx-mc8r
|
| risk_score |
1.4 |
| exploitability |
0.5 |
| weighted_severity |
2.8 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-8tmm-r9hx-t7gh |
|
| 1 |
| url |
VCID-afhu-wkta-q3et |
| vulnerability_id |
VCID-afhu-wkta-q3et |
| summary |
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
shescape is a simple shell escape package for JavaScript. In shescape, anyone using _Shescape_ to defend against shell injection may still be vulnerable against shell injection if the attacker manages to insert a into the payload. For an example see the referenced GitHub Security Advisory. The problem has been patched No further changes are required. |
| references |
|
| fixed_packages |
|
| aliases |
CVE-2021-21384, GHSA-f2rp-38vg-j3gh
|
| risk_score |
4.0 |
| exploitability |
0.5 |
| weighted_severity |
8.0 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-afhu-wkta-q3et |
|
| 2 |
| url |
VCID-cy6p-xc3p-wbe1 |
| vulnerability_id |
VCID-cy6p-xc3p-wbe1 |
| summary |
Withdrawn Advisory: Shescape has possible misidentification of shell due to link chains
This impacts users of Shescape that configure their `shell` to point to a file on disk that is a link to a link. The precise result of being affected depends on the actual shell used and incorrect shell identified by Shescape.
In particular, an attacker may be able to bypass escaping for the shell being used. This can result, for example, in exposure of sensitive information, consider the following proof of concept (targeting Shescape v2):
```javascript
import fs from "node:fs";
import { exec } from "node:child_process";
import { Shescape } from "shescape";
import which from "which";
/* 1. Set up */
const shell = which.sync("bash");
const linkToShell = "./csh";
const linkToLink = "./link";
fs.rmSync(linkToLink, { force: true });
fs.rmSync(linkToShell, { force: true });
fs.symlinkSync(shell, linkToShell);
fs.symlinkSync(linkToShell, linkToLink);
/* 2. Misconfiguration */
const execOptions = {
shell: linkToLink,
};
const shescape = new Shescape({
shell: execOptions.shell,
});
/* 3. Payload */
const userInput = "a=:~";
/* 4. Attack example */
exec(
`echo Hello ${shescape.escape(userInput)}`,
{ shell: execOptions.shell },
(error, stdout) => {
fs.rmSync(linkToLink);
fs.rmSync(linkToShell);
if (error) {
console.error(`An error occurred: ${error}`);
} else {
console.log(stdout);
// Output: "Hello a=:/home/user"
}
},
);
``` |
| references |
|
| fixed_packages |
|
| aliases |
CVE-2026-30916, GHSA-6f6w-6j58-rq76
|
| risk_score |
1.4 |
| exploitability |
0.5 |
| weighted_severity |
2.7 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-cy6p-xc3p-wbe1 |
|
| 3 |
|
| 4 |
| url |
VCID-px7h-1hh9-wuhs |
| vulnerability_id |
VCID-px7h-1hh9-wuhs |
| summary |
Shescape prior to 1.5.8 vulnerable to insufficient escaping of line feeds for CMD
### Impact
This impacts users that use Shescape (any API function) to escape arguments for **cmd.exe** on **Windows**. An attacker can omit all arguments following their input by including a line feed character (`'\n'`) in the payload. Example:
```javascript
import cp from "node:child_process";
import * as shescape from "shescape";
// 1. Prerequisites
const options = {
shell: "cmd.exe",
};
// 2. Attack
const payload = "attacker\n";
// 3. Usage
let escapedPayload;
escapedPayload = shescape.escape(payload, options);
// Or
escapedPayload = shescape.escapeAll([payload], options)[0];
// Or
escapedPayload = shescape.quote(payload, options);
// Or
escapedPayload = shescape.quoteAll([payload], options)[0];
cp.execSync(`echo Hello ${escapedPayload}! How are you doing?`, options);
// Outputs: "Hello attacker"
```
> **Note**: `execSync` is just illustrative here, all of `exec`, `execFile`, `execFileSync`, `fork`, `spawn`, and `spawnSync` can be attacked using a line feed character if CMD is the shell being used.
### Patches
This bug has been patched in [v1.5.8] which you can upgrade to now. No further changes are required.
### Workarounds
Alternatively, line feed characters (`'\n'`) can be stripped out manually or the user input can be made the last argument (this only limits the impact).
### References
- https://github.com/ericcornelissen/shescape/pull/332
- https://github.com/ericcornelissen/shescape/releases/tag/v1.5.8
### For more information
If you have any questions or comments about this advisory:
- Comment on https://github.com/ericcornelissen/shescape/pull/332
- Open an issue at https://github.com/ericcornelissen/shescape/issues (_New issue_ > _Question_ > _Get started_)
[v1.5.8]: https://github.com/ericcornelissen/shescape/releases/tag/v1.5.8 |
| references |
|
| fixed_packages |
|
| aliases |
CVE-2022-31179, GHSA-jjc5-fp7p-6f8w, GMS-2022-3205
|
| risk_score |
4.0 |
| exploitability |
0.5 |
| weighted_severity |
8.0 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-px7h-1hh9-wuhs |
|
| 5 |
| url |
VCID-wpfp-cjd5-87g2 |
| vulnerability_id |
VCID-wpfp-cjd5-87g2 |
| summary |
Shescape escape() leaves bracket glob expansion active on Bash, BusyBox, and Dash
`Shescape#escape()` does not escape square-bracket glob syntax for Bash, BusyBox `sh`, and Dash. Applications that interpolate the return value directly into a shell command string can cause an attacker-controlled value like `secret[12]` to expand into multiple filesystem matches instead of a single literal argument, turning one argument into multiple trusted-pathname matches. |
| references |
| 0 |
|
| 1 |
| reference_url |
https://github.com/ericcornelissen/shescape |
| reference_id |
|
| reference_type |
|
| scores |
| 0 |
| value |
6.9 |
| scoring_system |
cvssv4 |
| scoring_elements |
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
|
| 1 |
| value |
MODERATE |
| scoring_system |
generic_textual |
| scoring_elements |
|
|
|
| url |
https://github.com/ericcornelissen/shescape |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
|
| fixed_packages |
|
| aliases |
CVE-2026-32094, GHSA-9jfh-9xrq-4vwm
|
| risk_score |
3.1 |
| exploitability |
0.5 |
| weighted_severity |
6.2 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-wpfp-cjd5-87g2 |
|
|