CVE-2025-59342
esm.sh is a nobuild content delivery network(CDN) for modern web …
esm.sh is a nobuild content delivery network(CDN) for modern web development. In 136 and earlier, a path-traversal flaw in the handling of the X-Zone-Id HTTP header allows an attacker to cause the application to write files outside the intended storage location. The header value is used to build a filesystem path but is not properly canonicalized or restricted to the application’s storage base directory. As a result, supplying ../ sequences in X-Zone-Id causes files to be written to arbitrary directories. Version 136.1 contains a patch.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/esm-dev/esm.sh/blob/main/server/router.go#L116
- github.com/esm-dev/esm.sh/blob/main/server/router.go#L411
- github.com/esm-dev/esm.sh/commit/833a29f42aeb0acbd7089a71be11dd0a292d3151
- github.com/esm-dev/esm.sh/security/advisories/GHSA-g2h5-cvvr-7gmw
- nvd.nist.gov/vuln/detail/CVE-2025-59342
- pkg.go.dev/vuln/GO-2025-3967
- github.com/advisories/GHSA-g2h5-cvvr-7gmw
- nvd.nist.gov/vuln/detail/CVE-2025-59342
- cve.org/CVERecord?id=CVE-2025-59342
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.