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.
- Risk Scoring
Score a vulnerability with CVSS v3.1, or an incident across five dimensions, and see the reasoning behind each number.
- Map and Score
Map real procedures to ATT&CK techniques, then pick the CVSS v3.1 metrics for real vulnerabilities.
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
- Use-After-Free: Using a pointer after its memory has been freed and possibly reused.
- Arbitrary Read/Write Primitive: The ability to read or write any chosen memory address at will.
- Information Leak: Disclosing memory contents to defeat randomization or steal secrets.