CVE-2022-45907
Python vulnerability analysis and mitigation

Overview

CVE-2022-45907 is a security vulnerability discovered in PyTorch affecting versions before trunk/89695. The vulnerability was disclosed on November 26, 2022, and involves the torch.jit.annotations.parse_type_line function which could allow arbitrary code execution due to unsafe use of the eval function (NVD, CVE).

Technical details

The vulnerability exists in the torch.jit.annotations.parse_type_line function where eval is used unsafely to process type annotations. This implementation could allow arbitrary Python code execution through specially crafted type annotations. The vulnerability has been assigned a CVSS v3.1 base score of 9.8 (Critical) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, indicating network accessibility, low attack complexity, and no required privileges or user interaction (NVD).

Impact

The vulnerability allows attackers to execute arbitrary code on affected systems through the unsafe evaluation of type annotations. This could lead to complete system compromise, as demonstrated by the ability to execute system commands through crafted type annotations (GitHub Issue).

Mitigation and workarounds

The vulnerability was fixed in PyTorch trunk/89695 by introducing an _eval_no_call method that evaluates statements only if they do not contain any calls, which is determined by examining the bytecode. Users should upgrade to PyTorch version 1.13.1 or later which includes this security fix (GitHub Patch).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22033HIGH8.6
  • PythonPython
  • label-studio
NoNoJan 12, 2026
CVE-2025-68472HIGH8.1
  • PythonPython
  • mindsdb
NoYesJan 12, 2026
CVE-2026-22251MEDIUM5.3
  • PythonPython
  • wlc
NoYesJan 12, 2026
CVE-2026-22691LOW2.7
  • PythonPython
  • pypdf
NoYesJan 10, 2026
CVE-2026-22250LOW2.5
  • PythonPython
  • wlc
NoYesJan 12, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management