Skip to main content

Over 150 LLM Providers · Over 5,300 Models The most extensible AI-powered pentesting platform. Open source. Star on GitHub

CVE-2022-36113

4.6 · MEDIUM
Published Sep 14, 2022 rust-lang CWE-22 EPSS 1.05% (62th pctl)

Overview

CVE-2022-36113 is a medium-severity vulnerability affecting rust-lang cargo. It was published on September 14, 2022 and has a CVSS 3.1 base score of 4.6 (MEDIUM).

This vulnerability has a CVSS 3.1 base score of 4.6, rated MEDIUM. It can be exploited remotely over the network. Some level of privileges is required for exploitation.

Technical Description

Cargo is a package manager for the rust programming language. After a package is downloaded, Cargo extracts its source code in the ~/.cargo folder on disk, making it available to the Rust projects it builds. To record when an extraction is successful, Cargo writes "ok" to the .cargo-ok file at the root of the extracted source code once it extracted all the files. It was discovered that Cargo allowed packages to contain a .cargo-ok symbolic link, which Cargo would extract. Then, when Cargo attempted to write "ok" into .cargo-ok, it would actually replace the first two bytes of the file the symlink pointed to with ok. This would allow an attacker to corrupt one file on the machine using Cargo to extract the package. Note that by design Cargo allows code execution at build time, due to build scripts and procedural macros. The vulnerabilities in this advisory allow performing a subset of the possible damage in a harder to track down way. Your dependencies must still be trusted if you want

Remediation

Check the references section for vendor advisories and patches from rust-lang. Update cargo to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Affected Products

Vendor Product Versions Status
rust-lang cargo >= 0, < 0.65.0 Affected

Frequently Asked Questions

What is CVE-2022-36113?

CVE-2022-36113 is a medium-severity vulnerability affecting rust-lang cargo. It was published on September 14, 2022 and has a CVSS 3.1 base score of 4.6 (MEDIUM).

How severe is CVE-2022-36113?

This vulnerability has a CVSS 3.1 base score of 4.6, rated MEDIUM. It can be exploited remotely over the network. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2022-36113?

Check the references section for vendor advisories and patches from rust-lang. Update cargo to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2022-36113?

CyberStrike's AI-powered security agents can automatically detect CVE-2022-36113 across your infrastructure using autonomous pentesting, DAST scanning, and HackBrowser. The platform continuously monitors for known vulnerabilities and provides actionable remediation guidance prioritized by real-world exploitability.