wasmer-types is vulnerable to Integer Overflow or Wraparound
50
CVE Score
Medium
Integer Overflow or Wraparound
Wasmer's VMOffsets::new in lib/types/src/vmoffsets.rs lays out fixed funcref tables by multiplying each table's minimum element count by the per-element size and adding that product into a running u32 with checked_mul and checked_add, then calling unwrap(). Only a local table whose type is funcref and whose maximum equals its minimum takes this path; when that minimum makes the product or the sum overflow u32, the unwrap() calls panic and crash the process compiling or instantiating the module. The fix in version 7.5.0 adds VMOffsets::try_new, which returns a Result and replaces both unwrap() calls with ok_or_else, and the Wasmer compilers and VM call try_new so the oversized table becomes an error; VMOffsets::new remains a deprecated wrapper that still panics, and a max_table_elements check rejects oversized fixed tables before layout.
Upgrade the wasmer-types package to version 7.5.0 or later.
You are affected if you are using a version that falls within the vulnerable range and you compile or instantiate a WebAssembly module that declares a fixed-size funcref table whose minimum element count overflows the u32 layout size in VMOffsets::new.
7.2.0 - 7.4.2
Fixed in 7.5.0wasmer-types is vulnerable to Integer Overflow or Wraparound in versions 7.2.0 - 7.4.2.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.