dependency confusion

term

securityprogramming

Kept in this browser · My desk

Getting a public package installed in place of a private one with the same name, by exploiting an installer that searches several indexes.

pip's documentation calls --extra-index-url for private packages unsafe for this reason: across --index-url, --extra-index-url and --find-links there is no priority, and the best version wins. In a test with two local indexes, a public 99.0.0 beat the private 1.0.0, and even a pin to ==1.0.0 took the public index's file; only a requirement pinned by hash installed the private one. Use one index you control, or hash-checking mode.

Also known as: namespace confusion, extra-index-url confusion

← Back to D Back to the glossary