A cable lock includes a cable, a shackle pin connected to one end of the cable, and a lock body connected to the other end of the cable. The lock body includes at least one lock member pivotable from an open position disengaged from the shackle pin and biased to a closed position engaging the shackle pin, a key mechanism including a plug rotatable when a key is inserted therein, and a cam member rotated by the plug and including a cam surface configured to pivot the lock member to the open position.