PT-2025-38248 · Esm.Sh · Esm.Sh
J3Ssie
·
Published
2025-09-17
·
Updated
2026-04-17
·
CVE-2025-59342
CVSS v4.0
6.9
Medium
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
esm.sh versions 136 and earlier
Description
A path-traversal flaw exists in the handling of the
X-Zone-Id HTTP header. The header value is used to construct a filesystem path without proper sanitization or restriction to the application’s storage directory. Supplying ../ sequences in the X-Zone-Id header allows an attacker to write files to arbitrary directories. The vulnerable code is located in router.go at lines 116 and 411. This can lead to arbitrary file creation or overwriting outside the intended storage directory, potentially enabling remote code execution, persistence, or tampering with application files.Recommendations
Remove any
.. sequences from the X-Zone-Id header before processing the file.Exploit
Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Esm.Sh