CVE-2022-36113
Rust vulnerability analysis and mitigation

Overview

CVE-2022-36113 is a security vulnerability discovered in Cargo, Rust's package manager, affecting all versions prior to 0.65.0. The vulnerability was disclosed on September 14, 2022, and a fix was included in Rust 1.64, released on September 22, 2022. The issue specifically affects users of alternate registries, while users relying on crates.io are not impacted (Rust Blog).

Technical details

The vulnerability occurs during package extraction in the ~/.cargo folder. When Cargo extracts a package, it writes 'ok' to a .cargo-ok file to indicate successful extraction. The vulnerability allowed packages to contain a malicious .cargo-ok symbolic link, which when extracted, would cause Cargo to overwrite the first two bytes of the file the symlink pointed to with 'ok'. This vulnerability has been assigned a CVSS score of 4.8 with high attack complexity and requires user interaction (Oracle Security, GitHub Advisory).

Impact

The vulnerability allows an attacker who can upload packages to an alternate registry to corrupt arbitrary files on the machine using Cargo to extract the package. While classified as 'low' severity, it's important to note that Cargo already allows code execution at build time through build scripts and procedural macros, making this vulnerability a subset of existing potential damage vectors (Rust Blog).

Mitigation and workarounds

The vulnerability was fixed in Rust 1.64 (Cargo 0.65.0). For users of alternate registries, the recommended mitigation is to exercise care in package selection and only include trusted dependencies. Patch files for Rust 1.63.0 were made available in the wg-security-response repository for users building their own toolchains (Rust Blog).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22698HIGH8.7
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22700HIGH7.5
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22699HIGH7.5
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22705MEDIUM6.4
  • RustRust
  • ml-dsa
NoYesJan 10, 2026
CVE-2025-15504MEDIUM4.8
  • PythonPython
  • lief
NoYesJan 10, 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