Intel

AIKIDO-2026-868088

wasm-bindgen is vulnerable to Type Confusion

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Sep 23, 2026
September 23, 2026

23

CVE Score

Low

Type Confusion

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

Upgrade the wasm-bindgen library to the patch version.

Who does this affect?

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.

Versions

0.2.0 - 0.2.122

Fixed in 0.2.123

Background info

wasm-bindgen is vulnerable to Type Confusion in versions 0.2.0 - 0.2.122.

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea