{"answers":{"affected":"2 open source packages ship an affected version, including app-builder-lib. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-27303 in the wild and no public exploit code.","fix":"Upgrade app-builder-lib to 24.13.2 or later.","what":"CVE-2024-27303 is a high-severity command injection vulnerability in electron-userland electron-builder, published on 6 Mar 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-27303 and fix it if it is affected.\n\nWhat it is: CVE-2024-27303 is a high-severity command injection vulnerability in electron-userland electron-builder, published on 6 Mar 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-27303 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- app-builder-lib (npm): affected all versions; fixed in 24.13.2\n- app-builder-lib (npm): affected all versions; fixed in 24.13.2\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-2024-27303/ (Markdown: https://insights.sbomify.com/CVE-2024-27303/index.md)","id":"CVE-2024-27303","markdown":"https://insights.sbomify.com/CVE-2024-27303/index.md","name":"CVE-2024-27303","record":{"aliases":["GHSA-r4pf-3v7r-hh55","openSUSE-SU-2024:13782-1"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"electron-builder NSIS installer","requires_auth":"low_privilege","summary":"An attacker can execute arbitrary code on Windows by placing a malicious cmd.exe in the installer directory, exploiting unsafe path resolution in electron-builder.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"electron-builder","vendor":"electron"}],"cvss":{"score":7.3,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-427","name":"Uncontrolled Search Path Element"},{"id":"CWE-426","name":"Untrusted Search Path"}],"description":"electron-builder is a solution to package and build a ready for distribution Electron, Proton Native app for macOS, Windows and Linux. A vulnerability that only affects eletron-builder prior to 24.13.2 in Windows, the NSIS installer makes a system call to open cmd.exe via NSExec in the `.nsh` installer script. NSExec by default searches the current directory of where the installer is located before searching `PATH`. This means that if an attacker can place a malicious executable file named cmd.exe in the same folder as the installer, the installer will run the malicious file. Version 24.13.2 fixes this issue. No known workaround exists. The code executes at the installer-level before the app is present on the system, so there's no way to check if it exists in a current installer.","ecosystems":["npm","openSUSE:Tumbleweed"],"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":"electron-builder's NSIS installer - execute arbitrary code on the target machine (Windows only)","id":"CVE-2024-27303","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"command_injection","year":"2024"},"n_packages":3,"n_references":3,"next":{"headline":"pgx SQL Injection via Protocol Message Size Overflow","id":"CVE-2024-27304"},"packages":[{"ecosystem":"npm","fixed":["24.13.2"],"introduced":["0"],"last_affected":[],"package":"app-builder-lib","purl":null,"source":"GHSA-r4pf-3v7r-hh55"},{"ecosystem":"npm","fixed":["24.13.2"],"introduced":["0"],"last_affected":[],"package":"app-builder-lib","purl":"pkg:npm/app-builder-lib","source":"GHSA-r4pf-3v7r-hh55"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["15.1.6-1.1"],"introduced":["0"],"last_affected":[],"package":"teleport","purl":"pkg:rpm/opensuse/teleport\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:13782-1"}],"prev":{"headline":"Authorization Bypass Through User-Controlled Key in go-zero","id":"CVE-2024-27302"},"products":["electron-builder"],"published":"2024-03-06","related":[{"cvss_score":7.8,"headline":"electron-updater: Uncontrolled search path elements within `AppImage` built by `app-builder-lib`","id":"CVE-2026-54672","kev_date_added":null,"published":"2026-06-30"},{"cvss_score":7.5,"headline":"Code Signing Bypass on Windows in electron-updater \u003c 6.3.0-alpha.6","id":"CVE-2024-39698","kev_date_added":null,"published":"2024-07-09"}],"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":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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":"2024-08-13","vendors":["electron-userland"]},"summary":"An attacker can execute arbitrary code on Windows by placing a malicious cmd.exe in the installer directory, exploiting unsafe path resolution in electron-builder.","url":"https://insights.sbomify.com/CVE-2024-27303/"}