Intel

AIKIDO-2026-778881

spomky-labs/cbor-php is vulnerable to Type Confusion

Type ConfusionGHSA-388j-mw2g-rx5f Published Today

65

Medium Risk

This Affects:

PHPspomky-labs/cbor-php
0.0.1 - 3.3.3
Fixed in 3.3.4
Are you affected? Scan for Free

TL;DR

The CBOR map objects store decoded entries in a native PHP array keyed by each key's normalized value. Because PHP casts numeric strings to integers and rejects arrays used as offsets, structurally distinct keys such as the integer 1, the text string 1, and a byte string collapse onto one slot while an array or map key raises an uncaught TypeError. Decoding untrusted CBOR can therefore crash the process or silently overwrite earlier entries, producing parser-differential behavior in COSE and WebAuthn use. The fix records each occupied slot's major type and rejects colliding, duplicate, and non-scalar keys.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you decode untrusted or externally controlled CBOR data.

Background info

spomky-labs/cbor-php is vulnerable to Type Confusion in versions 0.0.1 - 3.3.3.

How to fix this

Upgrade the spomky-labs/cbor-php library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform