Backporting CVE fixes from Pytorch v2.6.0 to v2.1.2

As per the discussion on issue Backport CVEs in Pytorch v2.1.2 from Pytorch v2.6.0 · Issue #153370 · pytorch/pytorch, is Prevent torch.jit.load path in torch.load when weights_only=True by mikaylagawarecki · Pull Request #143326 · pytorch/pytorch sufficient to backport CVE-2025-32434 in Pytorch v2.1.2?