The vulnerability stems from improper path validation in the is_local_uri function. The pre-patch logic: 1. Considered URIs with empty schemes ('') as local 2. Only checked hostnames after scheme validation 3. Allowed 'file://' scheme without proper restrictions. This enabled attackers to bypass local path checks using URI formats like '//proc/self/root' which would be considered local due to empty scheme handling. The patch fixed this by: 1. Immediately returning True for empty schemes before hostname checks 2. Tightening scheme validation logic 3. Adding explicit tests for /proc/self/root paths. The function's validation logic was the root cause of path traversal vulnerability.