{"answers":{"affected":"3 open source packages ship an affected version, including github.com/esm-dev/esm.sh. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-65026 exists.","fix":"Upgrade github.com/esm-dev/esm.sh to 0.0.0-20251118065157-87d2f6497574 or later.","what":"CVE-2025-65026 is a medium-severity code injection vulnerability in esm-dev esm.sh, published on 19 Nov 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-65026 and fix it if it is affected.\n\nWhat it is: CVE-2025-65026 is a medium-severity code injection vulnerability in esm-dev esm.sh, published on 19 Nov 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-65026 exists.\n\nAffected packages and fixed versions:\n- github.com/esm-dev/esm.sh (Go): affected all versions; fixed in 0.0.0-20251118065157-87d2f6497574\n- github.com/esm-dev/esm.sh (Go): affected all versions; fixed in 0.0.0-20251118065157-87d2f6497574\n- github.com/esm-dev/esm.sh (Go): affected all versions; fixed in 0.0.0-20251118065157-87d2f6497574\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-2025-65026/ (Markdown: https://insights.sbomify.com/CVE-2025-65026/index.md)","id":"CVE-2025-65026","markdown":"https://insights.sbomify.com/CVE-2025-65026/index.md","name":"CVE-2025-65026","record":{"aliases":["GHSA-hcpf-qv9m-vfgp","GO-2025-4139"],"analysis":{"component_type":"cloud_service","fix_type":"upgrade","impacts":["code_execution","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"esm.sh CDN service","requires_auth":"none","summary":"Attackers can inject JavaScript via CSS files served by esm.sh, leading to XSS in browsers or RCE in Electron apps.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"esm.sh","vendor":"esm"}],"cvss":{"score":6.1,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"esm.sh is a nobuild content delivery network(CDN) for modern web development. Prior to version 136, The esm.sh CDN service contains a Template Literal Injection vulnerability (CWE-94) in its CSS-to-JavaScript module conversion feature. When a CSS file is requested with the ?module query parameter, esm.sh converts it to a JavaScript module by embedding the CSS content directly into a template literal without proper sanitization. An attacker can inject malicious JavaScript code using ${...} expressions within CSS files, which will execute when the module is imported by victim applications. This enables Cross-Site Scripting (XSS) in browsers and Remote Code Execution (RCE) in Electron applications. This issue has been patched in version 136.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"esm.sh CDN service has JS Template Literal Injection in CSS-to-JavaScript","id":"CVE-2025-65026","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"code_injection","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"RomM Chained XSS and CSRF Vulnerabilities Enable Admin Account Takeover","id":"CVE-2025-65027"},"packages":[{"ecosystem":"Go","fixed":["0.0.0-20251118065157-87d2f6497574"],"introduced":["0"],"last_affected":[],"package":"github.com/esm-dev/esm.sh","purl":null,"source":"GHSA-hcpf-qv9m-vfgp"},{"ecosystem":"Go","fixed":["0.0.0-20251118065157-87d2f6497574"],"introduced":["0"],"last_affected":[],"package":"github.com/esm-dev/esm.sh","purl":"pkg:golang/github.com/esm-dev/esm.sh","source":"GHSA-hcpf-qv9m-vfgp"},{"ecosystem":"Go","fixed":["0.0.0-20251118065157-87d2f6497574"],"introduced":["0"],"last_affected":[],"package":"github.com/esm-dev/esm.sh","purl":"pkg:golang/github.com/esm-dev/esm.sh","source":"GO-2025-4139"}],"prev":{"headline":"esm.sh CDN service has arbitrary file write via tarslip","id":"CVE-2025-65025"},"products":["esm.sh"],"published":"2025-11-19","related":[{"cvss_score":8.7,"headline":"esm.sh is vulnerable to full-response SSRF","id":"CVE-2025-50180","kev_date_added":null,"published":"2026-02-25"},{"cvss_score":8.6,"headline":"esm.sh has SSRF localhost/private-network bypass in `/http(s)` module route","id":"CVE-2026-27730","kev_date_added":null,"published":"2026-02-25"},{"cvss_score":8.2,"headline":"esm.sh CDN service has arbitrary file write via tarslip","id":"CVE-2025-65025","kev_date_added":null,"published":"2025-11-19"},{"cvss_score":7.7,"headline":"esm.sh has path traversal in `extractPackageTarball` that enables file writes from malicious packages","id":"CVE-2026-23644","kev_date_added":null,"published":"2026-01-18"}],"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":"Go Vulnerability Database","prefix":"GO"},{"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":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-20","vendors":["esm-dev"]},"summary":"Attackers can inject JavaScript via CSS files served by esm.sh, leading to XSS in browsers or RCE in Electron apps.","url":"https://insights.sbomify.com/CVE-2025-65026/"}