INCIDENT MAP

Browse / AI Framework and Platform Flaws / CVE-2022-45907

PyTorch vulnerable to arbitrary code execution

CVE-2022-45907 ยท 2022-11-26 critical

Class
AI Framework and Platform Flaws (filed by a model that read the advisory)
Technique
Code and command execution
Affected
torch (PyPI)
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.3% chance of exploitation in 30 days

How it works, in short

PyTorch's parse_type_line passes type annotation text to eval, so crafted annotation input executes arbitrary Python code. (Our summary, written by a model. The source text is below.)

Details

In PyTorch before trunk/89695, torch.jit.annotations.parse_type_line can cause arbitrary code execution because eval is used unsafely. The fix for this issue is available in version 1.13.1. There is a release checker in issue #89855.

References

Source: GitHub Advisory Database, used under CC BY 4.0.