Skip to content
Noroxi
OSV ecosystem advisory

GHSA-cfcj-hqpf-hccf: @evomap/evolver: Path Traversal in `evolver fetch` default-branch `safeId` allows Hub-controlled overwrite of project files (RCE)

HighCVSS 8.8 · v3.1—No exploit Fix available

Noroxi assessment

Priority: Monitor (action score 35/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Anyone who can reach it over the internet can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
  • Fixed version: @evomap/evolver (npm) 1.70.0-beta.5.

Low priority for now. Upgrade to @evomap/evolver (npm) 1.70.0-beta.5 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: OSV

## Summary The `evolver fetch` subcommand in `index.js` writes Hub-supplied `bundled_files[]` into a directory derived from a Hub-supplied `skill_id`. When `--out` is not used, the path-sanitizing regex permits `.` characters, allowing a `skill_id` of `..` to escape the `skills/` subdirectory and resolve to the user's current working directory. Combined with the file-extension allow-list (which includes `.js`/`.json`/`.sh`/`.py`/`.md`), this lets a malicious Hub overwrite the victim's `index.js`, `package.json`, or other files in cwd, achieving remote code execution on the next invocation of the evolver. ## Details The vulnerable code is in the `fetch` command handler: ```js // index.js:847-873 const data = await resp.json(); const outFlag = args.find(a => typeof a === 'string' && a.startsWith('--out=')); const safeId = String(data.skill_id || skillId).replace(/[^a-zA-Z0-9_\-\.]/g, '_'); let outDir; if (outFlag) { const rawOut = outFlag.slice('--out='.length); // ... const resolvedOut = path.resolve(process.cwd(), rawOut); const cwd = path.resolve(process.cwd()); const rel = path.relative(cwd, resolvedOut); if (rel.startsWith('..') || path.isAbsolute(rel)) { // <-- traversal check exists for --out console.error('[fetch] --out= must resolve to a path inside the current working directory'); process.exit(1); } outDir = resolvedOut; } else { outDir = path.join('.', 'skills', safeId); // <-- NO traversal check } if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); ``` Three problems compose: 1. **The regex allow-list permits `.`** — `[^a-zA-Z0-9_\-\.]` only strips characters *outside* this set, so the literal dot is preserved. A `skill_id` of `..` (verified: `'..'.replace(/[^a-zA-Z0-9_\-\.]/g,'_') === '..'`) survives sanitization. 2. **`path.join` collapses `..` traversal** — `path.join('.', 'skills', '..')` evaluates to `'.'` (the cwd), so `outDir` is now the user's working directory rather than `./skills/<id>`. 3. **The traversal validation only runs in the `--out` branch** — the default branch (the documented common case for `evolver fetch --skill <id>`) has no `path.relative(...).startsWith('..')` check. The bundled-files write loop: ```js // index.js:881-906 const ALLOWED_SKILL_EXTENSIONS = new Set([ '.js', '.mjs', '.cjs', '.ts', '.json', '.md', '.txt', '.sh', '.py', '.yml', '.yaml', ]); // ... for (const file of bundled) { if (!file || !file.name || typeof file.content !== 'string') continue; const safeName = path.basename(file.name); // basename of "index.js" is "index.js" const ext = path.extname(safeName).toLowerCase(); if (!ALLOWED_SKILL_EXTENSIONS.has(ext)) { /* skip */ continue; } if (Buffer.byteLength(file.content, 'utf8') > MAX_SKILL_FILE_BYTES) { /* skip */ continue; } fs.writeFileSync(path.join(outDir, safeName), file.content, 'utf8'); } ``` `path.basename` strips directory components from the *file name*, but a basename of `index.js` is still `index.js`. The extension allow-list contains `.js`, so an attacker can write `./index.js` (the evolver entry point itself), `./package.json`, `./SKILL.md`, etc. There is no signature verification on the Hub response. `buildHubHeaders()` only authenticates the *outgoing* request; the response body is trusted as-is. The Hub stores skills uploaded by network participants, so any participant who can set a stored `skill_id` field to `..` triggers this on every download. ## PoC Reproduces the exact code path from `index.js:849-905`: ```bash cd /tmp && rm -rf evolver-poc-validate && mkdir evolver-poc-validate && \ cp /path/to/EvoMap-evolver-src/index.js evolver-poc-validate/ cd evolver-poc-validate wc -l index.js # 1098 index.js (legitimate) node -e " const fs=require('fs'),path=require('path'); const data={ skill_id:'..', content:'x', bundled_files:[{name:'index.js',content:'#!/usr/bin/env node\nconsole.log(\"PWNED\");'}] }; const safeId=String(data.skill_id||'x').replace(/[^a-zA-Z0-9_\-\.]/g,'_'); const outDir=path.join('.','skills',safeId); console.log('safeId:',JSON.stringify(safeId)); // '..' console.log('outDir:',JSON.stringify(outDir)); // '.' if(!fs.existsSync(outDir))fs.mkdirSync(outDir,{recursive:true}); for(const f of data.bundled_files){ const n=path.basename(f.name); fs.writeFileSync(path.join(outDir,n),f.content); }" wc -l index.js # 1 index.js (clobbered) head -3 index.js # #!/usr/bin/env node # console.log("PWNED"); ``` Verified output: 1098 → 1 line; the legitimate evolver entry point is replaced with attacker-controlled JavaScript. Any subsequent `node index.js <command>` (including the `--loop` daemon mode that users run continuously) executes the attacker payload. End-to-end attack: 1. Attacker uploads a skill to the A2A Hub whose stored `skill_id` is `..` (or operates a malicious Hub / MitMs the connection / supplies a malicious `A2A_HUB_URL`). 2. The malicious response also carries `bundled_files: [{name: 'index.js', content: '<attacker JS>'}]`. 3. Victim runs `node index.js fetch --skill=anything` from the evolver checkout (the documented usage). 4. `./index.js` is overwritten in place. 5. Victim's next `node index.js` invocation — even just `node index.js --help` or the `run --loop` daemon — executes attacker code with the victim's privileges. ## Impact - **Remote code execution** in the victim's environment with the privileges of the evolver process. Because the loop daemon (`node index.js run --loop`) is the documented long-running mode, the malicious code typically gets executed within seconds of the next iteration. - Attacker can also overwrite `package.json` (allowed extension), `SKILL.md`, `.env`-adjacent `.json`/`.yaml`/`.yml` config files, and any whitelisted file already present in the cwd. - Trust boundary violation: `evolver fetch` is presented as a *download* operation; users would not expect it to overwrite the application binary or project files. The `--out` branch was hardened against exactly this; the default branch was missed. - A single malicious skill upload compromises every user that fetches it. ## Recommended Fix Reject `safeId` values that are not single non-traversing path segments before joining, or reuse the same `path.relative` check used in the `--out` branch. Minimal patch around `index.js:849`: ```js const safeId = String(data.skill_id || skillId).replace(/[^a-zA-Z0-9_\-\.]/g, '_'); if ( safeId === '' || safeId === '.' || safeId === '..' || safeId.includes('/') || safeId.includes('\\') || safeId.includes('\0') ) { console.error('[fetch] Hub returned an invalid skill_id: ' + JSON.stringify(safeId)); process.exit(1); } ``` Defense in depth — apply the existing traversal check to the default branch as well: ```js } else { const candidate = path.resolve(process.cwd(), 'skills', safeId); const skillsRoot = path.resolve(process.cwd(), 'skills'); const rel = path.relative(skillsRoot, candidate); if (rel.startsWith('..') || path.isAbsolute(rel)) { console.error('[fetch] Hub returned a skill_id that escapes the skills/ directory'); process.exit(1); } outDir = candidate; } ``` Additionally, consider: - Removing `.` from the regex allow-list (skill IDs typically don't need dots). - Verifying a Hub-supplied signature over the response payload before writing any file to disk. - Disallowing bundled-file `safeName` values that match top-level project files (`index.js`, `package.json`, `package-lock.json`, etc.) regardless of `outDir`.

Published
May 5, 2026
Updated
May 5, 2026
EPSS
—

Report tools

JSON

Action score

35

Monitor

Low priority for now.

CVSS
35 / 40 · 8.8 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · —

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow GHSA-cfcj-hqpf-hccf

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools
Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
npm@evomap/evolver

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
npm@evomap/evolverbefore 1.70.0-beta.51.70.0-beta.5

Same product

npm: all records

Other highest-scoring records for the same primary product.

  • GHSA-jxh8-jh77-xh6g@evomap/evolver's validator sandbox allowlist permits `npm`/`npx`, yielding RCE from Hub-delivered validation tasks via lifecycle scripts
    32Monitor
  • GHSA-7xp7-m392-h92c@evomap/evolver has an unbounded request body in proxy /asset/submit that causes persistent disk-exhaustion DoS
    24Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
npm:@evomap/evolver1.70.0-beta.5Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • A user must open a link or visit a page.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

osv

References

Show all references (1 more)

Vendor advisories and official records. Exploit/PoC links are deliberately left out.

All records