Offline evidence checker for CVE-2026-58040 — Node.js: HTTPS Agent TLS session identity-policy bypass. It compares operator-reported Node.js runtime versions with the fixed releases named in the vendor advisory and writes a CSV, JSON or script-free HTML triage report. Python 3.10+, standard library only; the executable can be copied alone.
Overview · Quick start · Report preview · Usage · Input files · Interpreting results · Output formats · Limits and exit codes · Limitations · Sources · Documentation · Contributing and license
This repository covers only CVE-2026-58040. The checker evaluates version evidence that you supply; it is triage, not a vulnerability scan.
- Offline only. It never contacts websites, executes Node.js or project code, or sends exploit payloads. No network mode is implemented.
- No automatic discovery. It does not scan the current machine. Supply the exact version obtained from the deployed process. A public URL is not an inventory.
- Conservative results. Hidden versions, custom builds, conflicting evidence, and uncovered branches remain
unknown. - Not a verification. Every result has
exploitability: not_tested.potentially_affectedis not confirmed exploitability, andfixed_version_reportedis not proof that a deployed runtime is patched. Nothing here claims exploitation or production verification. - Authorized use. Use it only for runtimes and inventories you are authorized to assess.
Requirements: Python 3.10 or later. There is nothing to install; CI runs the tests on Python 3.10 and 3.14 on Ubuntu and Windows.
# One exact runtime version, JSON report on stdout
python node_cve_2026_58040_check.py --version 22.23.2 --format json
# A JSON inventory, saved as an HTML report
python node_cve_2026_58040_check.py --inventory examples/inventory.example.json --format html --output report.html
# Your own CSV list (see Input files), exiting 1 if any result is potentially_affected or unsupported_runtime
python node_cve_2026_58040_check.py --csv-list inventory.csv --fail-on-finding
# Full option list, and the local-only test suite
python node_cve_2026_58040_check.py --help
python -m unittest -vThe default output format is CSV on stdout. Read Interpreting results before acting on a report.
Open the synthetic example report. Example data only; this is not a live assessment.
Provide at least one of --version, --inventory or --csv-list; they can be combined in one run, and all inputs are assessed with the same rules. Option abbreviations are not accepted.
| Option | Purpose |
|---|---|
--version VERSION (alias --node-version) |
Assess one explicit Node.js version, offline. A single leading v is accepted. Repeatable; each value describes a separate runtime. |
--build-source SOURCE |
Provenance of the --version builds (at most 512 characters). The default unknown, upstream, official and official_upstream are compared as upstream builds; any other value is treated as a vendor, distribution or custom build and the result stays unknown. |
--https-agent-session-reuse {true,false}--different-identity-policies {true,false} |
Operator-reported precondition observations, applied to every --version input. Omitted means not reported. See Operator-reported preconditions. |
--inventory FILE |
JSON object or array of entries. Repeatable. See Input files. |
--csv-list FILE |
CSV list with a node_version column. Repeatable. See Input files. |
--format {csv,json,html} |
Report format. Default: csv. All formats carry the same evidence. |
--output FILE |
Write the report to a new file instead of stdout. |
--force |
Replace an existing --output file. Without it, existing reports are protected. Input files are never overwritten, even with --force. |
--brand NAME |
Organization name shown in the HTML report (at most 512 characters). Default: CompleteTech LLC. |
--fail-on-finding |
Exit 1 when any result is potentially_affected or unsupported_runtime. Operational errors still exit 2. |
--tool-version, --help |
Print the checker name and version, or the full help. |
Precondition flags and --build-source apply only to --version values. For files, set build_source and the observations in each record.
Supply stable local regular UTF-8 files. Keep real inventories, targets, reports and secrets outside version control; synthetic examples are in examples/ and docs/example-report.html.
A JSON inventory is one object or an array of 1 to 10,000 objects. Each record requires integer schema_version: 1 and string node_version. Optional fields are runtime (only "node"), label, build_source, and the two observation keys listed under Operator-reported preconditions, each boolean or null. Unknown keys, duplicate keys, non-finite numbers and invalid types are rejected.
[
{
"schema_version": 1,
"label": "example-service",
"runtime": "node",
"node_version": "22.23.2",
"build_source": "unknown",
"https_agent_session_reuse": null,
"different_identity_policies": null
}
]A CSV list needs a header row with a node_version column. Optional columns are label, build_source, https_agent_session_reuse and different_identity_policies; observation cells must be exactly true, false or blank. There are no schema_version or runtime columns. Undocumented or duplicate columns, rows with a different field count than the header, quotes inside unquoted cells, text after a closing quote, unterminated quotes, NUL characters and empty lists are rejected.
label,node_version,build_source,https_agent_session_reuse,different_identity_policies
example-service,22.23.2,unknown,,Each input produces one result. A result is an assessment of reported version evidence against a dated rule snapshot; it never tests exploitability.
Reviewed 2026-10-24 against the official release advisory and linked fixed releases.
| Node.js major | Fixed version |
|---|---|
| 22.x | 22.23.2 |
| 24.x | 24.18.1 |
| 26.x | 26.5.1 |
The vendor does not establish an introduced version; earlier versions of each named major are potentially_affected. Listed fix versions and later plain versions on that same major are fixed_version_reported. Other active or future majors remain unknown. Old end-of-life (EOL) majors produce unsupported_runtime as upgrade guidance, not as a claim that this particular flaw exists in every historical build. Vendor, backported and custom builds require vendor evidence and remain unknown.
Advisory caveat, preserved in every result: for each listed major, versions below its fixed version require remediation. Unlisted, custom/backported, and prerelease builds need explicit evidence; do not label unknown builds safe. The vendor does not specify an introduced version in the release advisory.
Only plain stable MAJOR.MINOR.PATCH versions are compared. Surrounding ASCII whitespace and one leading v are ignored.
status |
version_status |
Meaning |
|---|---|---|
potentially_affected |
below_fixed_version |
The reported version is below the fixed release of its listed major and needs remediation review. |
fixed_version_reported |
at_or_above_fixed_version |
The reported version is at or above the fixed release of its listed major. This is a reported version, not deployed-patch attestation. |
unsupported_runtime |
unsupported_release_line |
The major is past end-of-life in the Node.js release schedule (majors 0, 4–21, 23 and 25 at the 2026-10-24 review; major 0 is inferred). Upgrade guidance only. |
unknown |
version_not_disclosed |
No version was reported. |
unknown |
unrecognized_or_partial_version |
The value is not a plain MAJOR.MINOR.PATCH version, for example 22.23. |
unknown |
qualified_version_unverified |
A prerelease, nightly/rc build, package suffix or custom qualifier follows the version. |
unknown |
vendor_build_unverified |
A non-upstream build_source was reported. This takes precedence over version comparison; the upstream version does not show which patches or backports the build contains. |
unknown |
release_line_not_in_rules |
The major is neither listed above nor EOL. A newer or unlisted major is not assumed to be patched. |
unknown means missing or unclassifiable evidence and needs investigation. It does not mean unaffected. Results carry evidence_type: operator_reported_version, with evidence_confidence insufficient for unknown and low otherwise, plus a recommended next step.
Two optional observations can accompany an input. They are operator-supplied and unverified, appear in the report as reported_true, reported_false or not_reported, and never change the version result or establish reachability.
| Observation | Meaning |
|---|---|
https_agent_session_reuse |
https agent session reuse |
different_identity_policies |
different identity policies |
CSV, JSON and HTML reports are produced from the same evidence. Reports are fully rendered in memory before anything is written, so an encoding error cannot leave a half-written file.
- CSV quotes every field and neutralizes formula prefixes (
=,+,-,@) after leading whitespace. Completed assessments userecord_type=result. When no result exists, a singlerecord_type=summaryrow preservesreport_completeand rule metadata without an asset or verdict. Values containing NUL characters are rejected before a report is written. - JSON is one document with
tool,tool_version,report_schema_version,cve,rules_as_of,sources,complete,generated_atand aresultsarray. - HTML is a script-free page with a restrictive Content Security Policy. Results are ordered by severity, followed by the fixed-release table and deployment-verification guidance. An interrupted run is labelled as such.
CSV report schema v1 appends tool, tool_version and generated_at after the existing columns. Every result and empty summary carries the canonical checker identity and one UTC ISO-8601 run timestamp, shared with JSON, HTML and interruption recovery. This generation time is distinct from rules_as_of and does not attest when evidence was acquired or when a deployment was patched.
| Limit | Value |
|---|---|
| File size | 4 MiB per file |
| Input files | 100 per run (--inventory and --csv-list combined) |
| Entries | 10,000 per run (including --version values) |
| Text fields | 512 characters |
Input files must be regular files, and so must an existing --output target.
| Code | Meaning |
|---|---|
0 |
The run completed. This does not mean the inputs are safe. |
1 |
Only with --fail-on-finding: at least one result is potentially_affected or unsupported_runtime. |
2 |
Usage, input, output or cleanup failure (an operational error, not an assessment result). This does not establish whether report bytes were already written; inspect the output before retrying. |
130 |
Interrupted. |
- With
--output, the target directory must already exist. An existing path is refused unless--forceis given, and the output may never be the same file as any input, even with--force. - File reports are staged in a temporary file and published atomically. Without
--force, publication uses a hard link so an existing file is never replaced; on a filesystem without hard links, choose another filesystem or explicitly use--force. - Stdout reports are not atomic.
- Before the output path is validated: nothing is written.
- After validation but before publication starts (for example while loading inputs): completed results are written as a partial report (
complete: falsein JSON,report_complete=falsein CSV, an "Interrupted run" notice in HTML) and the run exits 130. - After a complete report is published: that report is preserved and the run exits 130 without retrying.
- 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.
- During stdout output: the document can be left partial, and a second report is never appended.
- A second interrupt while recovering may mean the partial report was not written.
- Version metadata is not a patch or build signature. A reported version is evidence, not verified runtime state, and a reported fixed version is not a verified deployed patch.
- Rules are a dated snapshot (2026-10-24). The vendor does not specify an introduced version, so earlier versions of listed majors are treated as potentially affected without a lower bound.
- Hidden, qualified, vendor, backported and custom builds need vendor evidence and are not guessed.
- Preconditions and configuration hints are not proven reachability, and exploitability is never tested.
- File identity checks are not a sandbox against concurrent adversarial mutation of inputs. Use stable local copies.
- A public URL is not an inventory, and the checker does not discover runtimes.
Primary sources for the rules:
- Node.js July 2026 security releases
- Node.js security-wg record 189
- Node.js v22.23.2 release
- Node.js v24.18.1 release
- Node.js v26.5.1 release
End-of-life majors come from the Node.js release schedule, reviewed 2026-10-24 and embedded in the checker; it is not fetched at runtime.
The embedded engine is copied from node-cve-2026-105481-check commit de3161c4a8a7f7ca5c9e531df43b94e2805b52fd; no companion repository is required at runtime.
- CLI and evidence reference
- Implementation status
- Security policy
- Brand assets
- Agent and maintainer instructions
Contributions are welcome through a focused issue and pull request. Use synthetic fixtures, verify primary sources before changing rules, and run python -m unittest -v, python node_cve_2026_58040_check.py --help and git diff --check. Tests must not contact real targets, and real inventories, reports and secrets must stay out of commits. See CONTRIBUTING.md for the process and contribution licensing, and SECURITY.md to report a flaw in this project.
Licensed under GNU AGPL-3.0 (LICENSE) or a separate commercial license from CompleteTech LLC; see LICENSING.md. CompleteTech LLC names, logos and the artwork in docs/images/ are brand assets and are not covered by the code license; see BRAND_ASSETS.md. Linked advisory sources are external publications and are not relicensed here.
Copyright © 2026 CompleteTech LLC.
