Arbitrary Code Execution Affecting cranelift-codegen package, versions <0.85.2


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

EPSS
0.07% (31st 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 IDSNYK-RUST-CRANELIFTCODEGEN-2958082
  • published22 Jul 2022
  • disclosed22 Jul 2022
  • creditUnknown

Introduced: 22 Jul 2022

CVE-2022-31169  (opens in a new tab)
CWE-682  (opens in a new tab)

How to fix?

Upgrade cranelift-codegen to version 0.85.2 or higher.

Overview

cranelift-codegen is a translates code from an intermediate representation into executable machine code.

Affected versions of this package are vulnerable to Arbitrary Code Execution. The translation rules for constants did not take into account whether sign or zero-extension should happen which resulted in an incorrect value being placed into a register when a division was encountered. The impact of this bug is that programs executing within the WebAssembly sandbox would not behave according to the WebAssembly specification. This means that it is hypothetically possible for execution within the sandbox to go awry and WebAssembly programs could produce unexpected results.

CVSS Scores

version 3.1