Memory Safety Vulnerability in Rust Programming Language Standard Library

rust Updated 02 Oct 2025

Summary

13/05/2019
N/A
Yes i
High
8.1

CVE-2019-12083: The Rust Programming Language Standard Library 1.34.x before 1.34.2 contains a stabilized method which, if overridden, can violate Rust's safety guarantees and cause memory unsafety. Affects rust across 2 version ranges.

< 1.34.2-r0 >= 91856ed52c58aa5ba66a015354d1cc69e9779bdf, < 6c2484dc3c532c052f159264e970278d8b77cdc9

Fixed in 1.34.2-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Rust Programming Language Standard Library is a core component of the Rust programming language. It provides a set of common tools and functionality for Rust developers. The library is widely used in various applications and frameworks. However, versions 1.34.x before 1.34.2 of the library contain a memory safety vulnerability that can be exploited if the Error::type_id method is overridden. This can lead to memory unsafety and potential out-of-bounds write or read vulnerabilities in safe code.

Vulnerability Detail

The vulnerability (CVE-2019-12083) arises from a stabilized method in the Rust Programming Language Standard Library. If the Error::type_id method is overridden, it allows any type to be safely cast to any other type, violating Rust's safety guarantees. This can result in memory safety vulnerabilities, such as out-of-bounds write or read. It is important to note that code that does not manually implement Error::type_id is unaffected by this vulnerability.

How To Fix

Minimum fixed version

1.34.2-r0

This is the first release that contains the fix.

sudo apk add --upgrade rust

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, updating the library to the fixed version is the recommended solution.

Conclusion

The memory safety vulnerability in the Rust Programming Language Standard Library (CVE-2019-12083) can lead to memory unsafety and potential out-of-bounds write or read vulnerabilities. It is crucial to update the library to version 1.34.2 or later to mitigate this issue. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for rust →

Share this vulnerability

FAQ

The vulnerability can lead to memory unsafety and potential out-of-bounds write or read vulnerabilities in safe code.

Versions 1.34.x before 1.34.2 are affected by this vulnerability.

No, code that does not manually implement Error::type_id is unaffected by this vulnerability.

To fix this vulnerability, update the Rust Programming Language Standard Library to version 1.34.2 or later.

There are no specific workarounds mentioned for this vulnerability. Updating the library to the fixed version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for rust.

How To Fix

Minimum fixed version

1.34.2-r0

This is the first release that contains the fix.

sudo apk add --upgrade rust

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback