wasm-bindgen is vulnerable to Type Confusion
23
Low Risk
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.
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.
wasm-bindgen is vulnerable to Type Confusion in versions 0.2.0 - 0.2.122.
Upgrade the wasm-bindgen library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

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.