CyberKit

Type Confusion

Treating a memory object as a different type than it actually is.

What it is

A bug where code accesses an object assuming one type while it is actually another, due to an unchecked cast or polymorphism error. The mismatched layout lets an attacker misinterpret fields, including pointers.

Why it matters

Type confusion is a top exploitation vector in browsers and JIT engines because it cheaply yields fake objects and pointer control. Diagnosing it requires understanding object layouts, not just memory addresses.

In practice

A scripting engine treats a Number as an Array object, so attacker-controlled bytes are interpreted as a length and backing-store pointer.

What to look for

  • Casts between object types without checks.
  • JavaScript engine and browser advisories.
  • Crashes reading fields at wrong offsets.

Common mistake

Trusting a type tag the attacker can influence. Validate before the cast.

Practice it nearby

CyberKit has no tool for this term itself. These are the closest places to practice it.

In the field

Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.

  • Nessus Commercial

    A vulnerability scanner that checks hosts for known flaws and missing patches.

  • Qualys VMDR Commercial

    A cloud platform that scans assets and ranks vulnerabilities for patching.

  • OpenVAS Open source

    An open source vulnerability scanner with a large set of checks.

  • Nuclei Open source

    Runs community templates that test for specific, newly published flaws.

Read next

Sources