{"id":"UBUNTU-CVE-2022-45907","details":"In PyTorch before trunk/89695, torch.jit.annotations.parse_type_line can cause arbitrary code execution because eval is used unsafely.","modified":"2026-04-27T17:53:17.672572Z","published":"2022-11-26T02:15:00Z","upstream":["CVE-2022-45907"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2022-45907"},{"type":"REPORT","url":"https://github.com/pytorch/pytorch/commit/767f6aa49fe20a2766b9843d01e3b7f7793df6a3"},{"type":"REPORT","url":"https://github.com/pytorch/pytorch/issues/88868"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2022-45907"}],"affected":[{"package":{"name":"pytorch","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/pytorch@1.8.1-4?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7.1-7","1.8.1-4"],"ecosystem_specific":{"binaries":[{"binary_name":"libtorch-test","binary_version":"1.8.1-4"},{"binary_name":"libtorch1.8","binary_version":"1.8.1-4"},{"binary_name":"python3-torch","binary_version":"1.8.1-4"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-45907.json"}},{"package":{"name":"pytorch","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/pytorch@2.6.0+dfsg-7?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.6.0+dfsg-5build1","2.6.0+dfsg-7"],"ecosystem_specific":{"binaries":[{"binary_name":"libtorch-test","binary_version":"2.6.0+dfsg-7"},{"binary_name":"libtorch2.6","binary_version":"2.6.0+dfsg-7"},{"binary_name":"python3-torch","binary_version":"2.6.0+dfsg-7"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-45907.json"}},{"package":{"name":"pytorch","ecosystem":"Ubuntu:26.04","purl":"pkg:deb/ubuntu/pytorch@2.9.1+dfsg-1~exp1ubuntu2?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.6.0+dfsg-7","2.6.0+dfsg-9","2.9.1+dfsg-1~exp1ubuntu2"],"ecosystem_specific":{"binaries":[{"binary_name":"libtorch-test","binary_version":"2.9.1+dfsg-1~exp1ubuntu2"},{"binary_name":"libtorch2.9","binary_version":"2.9.1+dfsg-1~exp1ubuntu2"},{"binary_name":"python3-torch","binary_version":"2.9.1+dfsg-1~exp1ubuntu2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-45907.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}