The vulnerability lies in the scenario decoding process, where a user-supplied zip archive is decompressed without checking the size of the extracted content. This allows for a zip bomb attack, a form of denial-of-service. The analysis of the patch commit 14042aa reveals the exact location of the vulnerability.
The patch introduces a new file pkg/scenario/decompressor.go which contains a Decompressor type. This new type is responsible for safely decompressing the archive by enforcing a maximum size limit (MaxSize).
The vulnerable code was located in pkg/scenario/io.go. The Decode function was responsible for the overall process and called a local copyTo function. The copyTo function used io.Copy to write the decompressed file to disk without any size validation. The patch refactored the Decode function to use the new safe Decompressor and removed the vulnerable copyTo function.
Therefore, the functions Decode and the original copyTo in pkg/scenario/io.go are identified as the vulnerable functions. During runtime exploitation, a profiler would show Decode being called, which in turn would have called the vulnerable copyTo function in the unpatched version.