wasm-bindgen is vulnerable to Type Confusion
23
CVE Score
Low
Type Confusion
wasm-bindgen ships a blanket UpcastFrom<&mut T> implementation that lets code widen a &mut T reference into &mut Target for any two JS bound types, without requiring the reverse cast to also be valid. Application code that performs this mutable upcast and writes a value through the widened reference can store a value whose runtime type does not match the type expected by holders of the original &mut T, a type confusion. A later read gets a value with the wrong shape, which can corrupt program state or panic. The fix requires mutual upcastability (Target: UpcastFrom<T> and T: UpcastFrom<Target>) so only sound widenings compile.
Upgrade the wasm-bindgen library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and your code performs a mutable reference upcast (Upcast/UpcastFrom) between two JS bound wrapper types.
0.2.0 - 0.2.122
Fixed in 0.2.123wasm-bindgen is vulnerable to Type Confusion in versions 0.2.0 - 0.2.122.
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.