A wormhole that functions as a time machine is a theoretical possibility within the laws of physics. All time travel constructs require something completely exotic, an exotic matter or an exotic space.

Wormholes, in theory, would allow such a machine to be built. These time machines, therefore, would be very difficult to build due to the difficulty of obtaining the necessary exotic matter, but even if you built them, they have horizons and forces operating at their entrance that would prevent them from leaving unharmed.