The vulnerability lies in the handling of the X-Zone-Id header within the esmRouter function in server/router.go. The provided commit 833a29f42aeb0acbd7089a71be11dd0a292d3151 clearly shows the fix for this path traversal vulnerability. The patch modifies the esmRouter function to validate the X-Zone-Id header before it's used in normalizeSavePath to construct a file path. Previously, the raw header value was used, allowing an attacker to use ../ to traverse the directory structure and write files outside the intended directory. The esmRouter function is the central point where the malicious input is processed, making it the vulnerable function that would appear in a runtime profile during exploitation of this vulnerability.