CVE-2022-23565: TensorFlow: DoS via malicious SavedModel AttrDef duplication
MEDIUMAny TensorFlow deployment that loads SavedModels from untrusted or externally-supplied sources is vulnerable to availability disruption. An attacker with write access to the model storage path can craft a malicious SavedModel that crashes the TF runtime on load. Patch immediately to TF 2.8.0+ (or cherrypick releases 2.5.3/2.6.3/2.7.1) and enforce strict integrity controls on SavedModel artifacts at rest.
Risk Assessment
Medium-severity DoS with low attack complexity once an adversary achieves write access to the model artifact. The network-accessible vector (AV:N) is misleading here — the realistic path requires the attacker to first compromise or manipulate model storage (S3 bucket, shared filesystem, model registry). Impact is availability-only with no confidentiality or integrity exposure, limiting blast radius to service outages. Deployments exposing dynamic model loading from user-controlled paths elevate this to high operational risk.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| tensorflow | pip | — | No patch |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
Patch: Upgrade to TensorFlow 2.8.0 or apply cherrypick to 2.5.3, 2.6.3, or 2.7.1.
-
Immediate workaround: Restrict write access to SavedModel directories to CI/CD service accounts only — no user-facing or external write paths.
-
Implement cryptographic integrity checks (hash + signature) on SavedModel files before loading in production.
-
Validate SavedModel structure in staging/pre-prod before deploying to serving infrastructure.
-
Detection: Monitor for unexpected TF process crashes correlated with model loads — repeated crashes signal active exploitation attempts.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2022-23565?
Any TensorFlow deployment that loads SavedModels from untrusted or externally-supplied sources is vulnerable to availability disruption. An attacker with write access to the model storage path can craft a malicious SavedModel that crashes the TF runtime on load. Patch immediately to TF 2.8.0+ (or cherrypick releases 2.5.3/2.6.3/2.7.1) and enforce strict integrity controls on SavedModel artifacts at rest.
Is CVE-2022-23565 actively exploited?
No confirmed active exploitation of CVE-2022-23565 has been reported, but organizations should still patch proactively.
How to fix CVE-2022-23565?
1. Patch: Upgrade to TensorFlow 2.8.0 or apply cherrypick to 2.5.3, 2.6.3, or 2.7.1. 2. Immediate workaround: Restrict write access to SavedModel directories to CI/CD service accounts only — no user-facing or external write paths. 3. Implement cryptographic integrity checks (hash + signature) on SavedModel files before loading in production. 4. Validate SavedModel structure in staging/pre-prod before deploying to serving infrastructure. 5. Detection: Monitor for unexpected TF process crashes correlated with model loads — repeated crashes signal active exploitation attempts.
What systems are affected by CVE-2022-23565?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, ML inference APIs, MLOps deployment pipelines.
What is the CVSS score for CVE-2022-23565?
CVE-2022-23565 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.12%.
Technical Details
NVD Description
Tensorflow is an Open Source Machine Learning Framework. An attacker can trigger denial of service via assertion failure by altering a `SavedModel` on disk such that `AttrDef`s of some operation are duplicated. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
Exploitation Scenario
An adversary with write access to a shared model registry (e.g., compromised MLOps service account, misconfigured S3 bucket ACL, or insider threat) uploads a crafted SavedModel with duplicate operation AttrDefs. When the model serving tier performs a scheduled model hot-reload or a deployment pipeline promotes the artifact to production, the TF runtime hits the reachable assertion, crashes the serving process, and the ML inference endpoint goes offline. In auto-scaling environments, new instances will also crash on startup until the malicious artifact is removed, causing a sustained outage. This is an effective technique for sabotaging AI-powered services while leaving minimal forensic trace.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H References
Timeline
Related Vulnerabilities
CVE-2020-15196 9.9 TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflow CVE-2020-15205 9.8 TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2019-16778 9.8 TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflow CVE-2022-23587 9.8 TensorFlow: integer overflow in Grappler enables RCE
Same package: tensorflow
AI Threat Alert