#5081·scapy

CBOR field strips off raw payload but not padding

Author: BrianSiposCreated Aug 11, 2026Updated Aug 25, 2026

If an individual CBOR_Packet-derived class decodes with excess data as Padding payload, it will be left in place when embedded within a CBOR_Field. Instead if it contains a Raw payload that meaningful Raw will be stripped off and treated as padding, selected below.

https://github.com/secdev/scapy/blob/b1a979988a6517acc7c234902b408fb2f4d449b0/scapy/cbor/cborfields.py#L156