Improper Input Validation Affecting nalgebra package, versions >=0.11.0 <0.27.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.23% (62nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Input Validation vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-NALGEBRA-1316316
  • published9 Jul 2021
  • disclosed6 Jun 2021
  • creditUnknown

Introduced: 6 Jun 2021

CVE-2021-38190  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade nalgebra to version 0.27.1 or higher.

Overview

nalgebra is a Linear algebra library for Rust.

Affected versions of this package are vulnerable to Improper Input Validation. The Deserialize implementation for VecStorage did not maintain the invariant that the number of elements must equal nrows * ncols. Deserialization of specially crafted inputs could allow memory access beyond allocation of the vector. This flaw was introduced in v0.11.0 (086e6e) due to the addition of an automatically derived implementation of Deserialize for MatrixVec. MatrixVec was later renamed to VecStorage in v0.16.13 (0f66403) and continued to use the automatically derived implementation of Deserialize. This flaw was corrected in commit 5bff536 by returning an error during deserialization if the number of elements does not exactly match the expected size.

References

CVSS Scores

version 3.1