{"answers":{"affected":"2 open source packages ship an affected version, including electerm. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-43940 in the wild and no public exploit code.","fix":"Upgrade electerm to 3.7.16 or later.","what":"CVE-2026-43940 is a high-severity path traversal vulnerability in electerm, published on 8 May 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-43940 and fix it if it is affected.\n\nWhat it is: CVE-2026-43940 is a high-severity path traversal vulnerability in electerm, published on 8 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-43940 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- electerm (npm): affected all versions; fixed in 3.7.16\n- electerm (npm): affected all versions; fixed in 3.7.16\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-43940/ (Markdown: https://insights.sbomify.com/CVE-2026-43940/index.md)","id":"CVE-2026-43940","markdown":"https://insights.sbomify.com/CVE-2026-43940/index.md","name":"CVE-2026-43940","record":{"aliases":["GHSA-f77v-9vpc-6pjm"],"analysis":{"component_type":"desktop_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"terminal client","requires_auth":"none","summary":"Attackers can achieve arbitrary code execution via path traversal in the runWidget function, compromising the system.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"electerm","vendor":"electerm_project"}],"cvss":{"score":8.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. Prior to version 3.7.16, the runWidget function in src/app/widgets/load-widget.js constructs a file path by directly concatenating user‑supplied widget identifiers without any sanitisation. Because runWidget is exposed to the renderer process via an asynchronous IPC handler with no input validation, an attacker who achieves JavaScript execution inside the renderer (for example, through a malicious plugin or a cross‑site scripting flaw in the built‑in webview) can abuse a path traversal (../) to load and execute an arbitrary JavaScript file anywhere on the victim’s filesystem. This gives the attacker local code execution with the full privileges of the electerm process, leading to complete system compromise. This issue has been patched in version 3.7.16.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"electerm: Path traversal in electerm runWidget leads to arbitrary code execution","id":"CVE-2026-43940","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":2,"n_references":2,"next":{"headline":"Unvalidated shell.openExternal in electerm allows arbitrary protocol execution via terminal link click","id":"CVE-2026-43941"},"packages":[{"ecosystem":"npm","fixed":["3.7.16"],"introduced":["0"],"last_affected":[],"package":"electerm","purl":null,"source":"GHSA-f77v-9vpc-6pjm"},{"ecosystem":"npm","fixed":["3.7.16"],"introduced":["0"],"last_affected":[],"package":"electerm","purl":"pkg:npm/electerm","source":"GHSA-f77v-9vpc-6pjm"}],"prev":{"headline":"YAF.NET: Stored XSS in Forum Thread Posts/Replies Allowing Arbitrary JavaScript Execution for All Thread Viewers","id":"CVE-2026-43939"},"products":["electerm"],"published":"2026-05-08","related":[{"cvss_score":9.8,"headline":"electerm has Command Injection Vulnerability via runMac function","id":"CVE-2026-41500","kev_date_added":null,"published":"2026-05-08"},{"cvss_score":9.8,"headline":"electerm has Command Injection Vulnerability via runLinux function","id":"CVE-2026-41501","kev_date_added":null,"published":"2026-05-08"},{"cvss_score":9.8,"headline":"electerm allows unauthorized users to execute arbitrary commands","id":"CVE-2020-23256","kev_date_added":null,"published":"2023-01-20"},{"cvss_score":9.6,"headline":"Unvalidated shell.openExternal in electerm allows arbitrary protocol execution via terminal link click","id":"CVE-2026-43941","kev_date_added":null,"published":"2026-05-08"},{"cvss_score":9.4,"headline":"electerm: dangerous code can be run through links or command line","id":"CVE-2026-43944","kev_date_added":null,"published":"2026-05-08"},{"cvss_score":9.3,"headline":"electerm: Local code through electerm's single-instance socket","id":"CVE-2026-45353","kev_date_added":null,"published":"2026-05-28"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-05-08","vendors":["electerm"]},"summary":"Attackers can achieve arbitrary code execution via path traversal in the runWidget function, compromising the system.","url":"https://insights.sbomify.com/CVE-2026-43940/"}