Security Advisories (1)
CVE-2026-8796 (2026-05-31)

Sereal::Decoder versions before 5.005 for Perl allow heap out-of-bounds read via crafted input. In Perl/Decoder/srl_decoder.c, srl_read_object() and srl_read_hash() process a COPY tag, a back-reference whose target byte the decoder re-decodes as a fresh tag. When that target byte matches the SHORT_BINARY pattern (an inline string whose length is encoded in the low bits of the tag), the resulting read is not bounded to precede the COPY tag's own offset and can run past the end of the input buffer. An attacker controlled COPY offset can land inside a previously decoded value rather than on a tag boundary, planting a byte that the decoder reads as a SHORT_BINARY tag and consuming up to 31 following bytes from the heap as a class name (OBJECT path) or hash key (HASH path).

Changes for version 2.07_01 - 2014-03-26

  • Add sereal_decode_with_object(), functional/custom-opcode implementation of the OO interface, with much less overhead. In practice this will make a very modest impact on dumping, but if your applications needs it... Thanks to Zefram for the custom op implementation.
  • Resolved: [rt.cpan.org #93888] does not preserve special SV identity We now handle \!0 and \!1 properly. Being able to distinguish \undef from \{my $x= undef} is left for a new protocol release. Reported by Zefram.
  • Resolved [rt.cpan.org #93892] downgrade breaks unwritable strings When decoding a UTF8-on SV we now sv_mortalcopy() it before we sv_utf8_downgrade() it. This prevents us from modifying the buffer during deserialization. Reported By Zefram.

Modules

Fast, compact, powerful binary deserialization

Provides

in lib/Sereal/Decoder/Constants.pm