The vulnerability lies in the lookup function within src/functions.js. The provided security advisory and commit patches clearly indicate that this function was missing a crucial security check. Specifically, the function did not use hasOwnProperty to verify that a requested property existed directly on the input object before accessing it. This oversight allowed for prototype traversal, enabling an attacker to access and manipulate properties of the global Object.prototype. The proof-of-concept demonstrates how to leverage this to gain access to the constructor property and execute arbitrary commands via child_process. The fix, present in both commits 4c5f4adfb90a9b500889d50f90050ca68888b50d and 4b217d514376e30cba278941298d7ba97c4a6c6e, introduces the Object.prototype.hasOwnProperty.call(input, key) check, which mitigates the vulnerability by ensuring only the object's own properties are accessed. Therefore, the lookup function is the direct source of the vulnerability.