Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
python: ['3.10', '3.14']
steps:
- name: Check out repository
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ before changing this project.

This repository covers only **CVE-2026-92935** (vm2 array-shaped require nesting escape). Its aliases
refer to the same exploit. Keep unrelated vulnerabilities in separate repositories.
The repository contains the offline checker `vm2_nesting_check.py`, synthetic tests and CI. Preserve the exact affected interval, disputed boundaries and reviewed fixed line; no network mode or application execution is implemented.
The repository contains the offline checker `vm2_nesting_check.py`, synthetic tests and CI. Optional --source produces bounded lexical NodeVM candidates, never runtime configuration or taint proof. Preserve the exact affected interval, disputed boundaries and reviewed fixed line; no network mode or application execution is implemented.

## Project map

Expand Down
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,42 @@ The reviewed fixed line is `3.11.x`; future lines remain unknown rather than ext
| `require_configuration_is_array_shaped` | require configuration is array-shaped |
| `attacker_supplied_javascript_executed` | attacker-supplied JavaScript executed |

Each observation is boolean or null, is unverified, and never changes the package-version result. No source search, taint analysis, reachability test, or runtime evaluation is performed. Absent observations do not establish mitigation.
Each observation is boolean or null, is unverified, and never changes the package-version result. Optional source inspection produces separate lexical candidates. No taint analysis, reachability test or runtime evaluation is performed. Absent observations do not establish mitigation.

## Source review candidates

```sh
python vm2_nesting_check.py --source examples/source.example.js --source-root examples --format json
python vm2_nesting_check.py --version 3.11.6 --source examples/source.example.js --source-root examples --format html
```

Select files explicitly with repeatable `--source`; `--source-root` is required
and all selected paths must resolve inside it. Nothing is traversed or executed.
The scanner recognizes simple literal `vm2` CommonJS/ES imports, including
destructuring aliases and namespace `.NodeVM` construction. For each `new`
candidate it records the relative path/line, literal `nesting`, array/object or
literal `require` shape, and a lexical association to `.run()` on a directly
assigned variable. A string argument is not proof of trusted input; a variable
argument is not proof of attacker control. Source rows always have status
`unknown`, exploitability `not_tested` and unfilled operator preconditions.
They never inherit a separately supplied version's assessment.

This is a bounded lexical review aid, not an AST or binding/flow analysis.
Shadowing, reassignment, execution order, computed imports/options, JSX/TS syntax,
templates including interpolation and regex/division ambiguity need manual
review. When no supported match is found, the report includes an unknown
coverage row, never an absence or mitigation verdict. Spreads, duplicate/computed keys, dynamic options
and option expressions exceeding 4,096 tokens keep their shapes unknown.

Source shares the existing 4 MiB/file, 100-file and 10,000-result budgets, with
an additional 200,000-token/file limit. Reports contain relative locations and
shape labels, without source snippets or source string contents. Work from
stable copies; ordinary file checks are not a filesystem sandbox. Selected
source files and their aliases remain protected from `--output --force`.
CSV/JSON report schema 1.1 adds `source_path`, `source_line`, `source_nesting`,
`source_require`, `source_run_argument` and `source_coverage`; HTML includes these
candidates in its evidence notes. Source candidates do not trigger the version
finding gate by themselves.

## Evidence and reports

Expand Down
2 changes: 1 addition & 1 deletion SHA256SUMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0dc11d3fb2b1ff3bb5a723551513a05e0e835246be7bb2e0391dc2da9264cf57 vm2_nesting_check.py
c513513958376d2915b026a3f869d31211f798ad4c48c4d0a5e97ff6be3b0652 vm2_nesting_check.py
4 changes: 4 additions & 0 deletions docs/IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ Implemented offline package-version evidence checker, with independent source/se
Local verification: 13 tests, CLI help, documented synthetic inputs, checksum validation and whitespace checks. Hosted CI must pass for the exact final PR head before merge; a local pass is not a hosted result. The advisory metadata now describes the implemented rule and preserves its original disabled research state under research_origin.

No live traffic, application execution, exploit verification or deployed-target assessment is claimed. Reported fixed versions do not attest installed patches; unknown evidence remains unknown.

## Source candidate extension (2026-10-25)

Implemented explicit bounded JS/TS source selection, literal vm2 import aliases, NodeVM construction and configuration shapes, relative locations and lexical run-argument association. Source evidence stays unknown, separate from version/operator observations. No AST, trust or runtime attestation is claimed. Templates, shadowing and dynamic syntax require manual review. Added source-specific synthetic tests and macOS CI; exact-head hosted checks remain a separate release gate. See README/REFERENCE for actual commands, schema 1.1 and bounds. Advisory thresholds and rule date are unchanged.
45 changes: 42 additions & 3 deletions docs/REFERENCE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Evidence and CLI reference
# vm2-nesting-check

Offline evidence checker for **CVE-2026-92935 — vm2 array-shaped require nesting escape**. Python 3.10+, standard library only. The executable can be copied alone. It never contacts websites, imports application code, runs a package manager, or executes exploit payloads.

Expand Down Expand Up @@ -36,7 +36,42 @@ The reviewed fixed line is `3.11.x`; future lines remain unknown rather than ext
| `require_configuration_is_array_shaped` | require configuration is array-shaped |
| `attacker_supplied_javascript_executed` | attacker-supplied JavaScript executed |

Each observation is boolean or null, is unverified, and never changes the package-version result. No source search, taint analysis, reachability test, or runtime evaluation is performed. Absent observations do not establish mitigation.
Each observation is boolean or null, is unverified, and never changes the package-version result. Optional source inspection produces separate lexical candidates. No taint analysis, reachability test or runtime evaluation is performed. Absent observations do not establish mitigation.

## Source review candidates

```sh
python vm2_nesting_check.py --source examples/source.example.js --source-root examples --format json
python vm2_nesting_check.py --version 3.11.6 --source examples/source.example.js --source-root examples --format html
```

Select files explicitly with repeatable `--source`; `--source-root` is required
and all selected paths must resolve inside it. Nothing is traversed or executed.
The scanner recognizes simple literal `vm2` CommonJS/ES imports, including
destructuring aliases and namespace `.NodeVM` construction. For each `new`
candidate it records the relative path/line, literal `nesting`, array/object or
literal `require` shape, and a lexical association to `.run()` on a directly
assigned variable. A string argument is not proof of trusted input; a variable
argument is not proof of attacker control. Source rows always have status
`unknown`, exploitability `not_tested` and unfilled operator preconditions.
They never inherit a separately supplied version's assessment.

This is a bounded lexical review aid, not an AST or binding/flow analysis.
Shadowing, reassignment, execution order, computed imports/options, JSX/TS syntax,
templates including interpolation and regex/division ambiguity need manual
review. When no supported match is found, the report includes an unknown
coverage row, never an absence or mitigation verdict. Spreads, duplicate/computed keys, dynamic options
and option expressions exceeding 4,096 tokens keep their shapes unknown.

Source shares the existing 4 MiB/file, 100-file and 10,000-result budgets, with
an additional 200,000-token/file limit. Reports contain relative locations and
shape labels, without source snippets or source string contents. Work from
stable copies; ordinary file checks are not a filesystem sandbox. Selected
source files and their aliases remain protected from `--output --force`.
CSV/JSON report schema 1.1 adds `source_path`, `source_line`, `source_nesting`,
`source_require`, `source_run_argument` and `source_coverage`; HTML includes these
candidates in its evidence notes. Source candidates do not trigger the version
finding gate by themselves.

## Evidence and reports

Expand All @@ -51,6 +86,10 @@ Exit 0: completed run; 1: potentially affected with `--fail-on-finding`; 2: argu
- https://github.com/patriksimek/vm2/security/advisories/GHSA-8hr7-r645-pc6w
- https://github.com/advisories/GHSA-8hr7-r645-pc6w

[Synthetic report](docs/example-report.html), [reference](docs/REFERENCE.md), [implementation status](docs/IMPLEMENTATION.md), [AGENTS](AGENTS.md), [contribution terms](CONTRIBUTING.md), [security policy](SECURITY.md), [license](LICENSE), [dual licensing](LICENSING.md). Bounded input and reporting helpers are bundled from the reviewed Node.js checker at `74aa57ba5df05c34d17ae67912cd26ec2335201b`, with package-specific range comparison and the mixed-whitespace CSV fix. No companion repository is needed at runtime.
[Synthetic report](example-report.html), [reference](REFERENCE.md), [implementation status](IMPLEMENTATION.md), [AGENTS](../AGENTS.md), [contribution terms](../CONTRIBUTING.md), [security policy](../SECURITY.md), [license](../LICENSE), [dual licensing](../LICENSING.md). Bounded input and reporting helpers are bundled from the reviewed Node.js checker at `74aa57ba5df05c34d17ae67912cd26ec2335201b`, with package-specific range comparison and the mixed-whitespace CSV fix. No companion repository is needed at runtime.

CSV `record_type=result` rows are asset observations. A zero-result report has a `record_type=summary` row carrying completeness, schema, rule date, CVE and `not_tested`; it is not an asset finding.

CSV rejects NUL characters before writing a report. An interruption after a complete report is published preserves that report and exits 130.

If an interrupt leaves file publication indeterminate, the checker exits 130 without retrying. Inspect the output before retrying; the diagnostic does not establish whether publication succeeded.
4 changes: 4 additions & 0 deletions examples/source.example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Synthetic review fixture. This file is read as text, never executed.
const { NodeVM: ReviewVM } = require('vm2');
const sandbox = new ReviewVM({ nesting: true, require: [] });
sandbox.run(operatorSuppliedCode);
Loading
Loading