Security Advisories (2)
CVE-2026-4176 (2026-03-29)

Perl versions from 5.9.4 before 5.40.4-RC1, from 5.41.0 before 5.42.2-RC1, from 5.43.0 before 5.43.9 contain a vulnerable version of Compress::Raw::Zlib. Compress::Raw::Zlib is included in the Perl package as a dual-life core module, and is vulnerable to CVE-2026-3381 due to a vendored version of zlib which has several vulnerabilities, including CVE-2026-27171. The bundled Compress::Raw::Zlib was updated to version 2.221 in Perl blead commit c75ae9cc164205e1b6d6dbd57bd2c65c8593fe94.

CVE-2026-8376 (2026-05-25)

Perl versions through 5.43.10 have a heap buffer overflow when compiling regular expressions with a repeated fixed string on 32-bit builds. Perl_study_chunk in regcomp_study.c checked the size of the joined substring buffer in characters rather than bytes. For a quantified fixed substring with a large minimum count, the byte length mincount * l could overflow SSize_t, producing an undersized SvGROW allocation; the subsequent copy writes past the end of the buffer. A caller that compiles an attacker-controlled regular expression on a 32-bit perl build triggers a heap buffer overflow at compile time.

NAME

Test2::Event::Generic - Generic event type.

DESCRIPTION

This is a generic event that lets you customize all fields in the event API. This is useful if you have need for a custom event that does not make sense as a published reusable event subclass.

SYNOPSIS

use Test2::API qw/context/;

sub send_custom_fail {
    my $ctx = shift;

    $ctx->send_event('Generic', causes_fail => 1, summary => 'The sky is falling');

    $ctx->release;
}

send_custom_fail();

METHODS

$e->facet_data($data)
$data = $e->facet_data

Get or set the facet data (see Test2::Event). If no facet_data is set then Test2::Event->facet_data will be called to produce facets from the other data.

$e->callback($hub)

Call the custom callback if one is set, otherwise this does nothing.

$e->set_callback(sub { ... })

Set the custom callback. The custom callback must be a coderef. The first argument to your callback will be the event itself, the second will be the Test2::Event::Hub that is using the callback.

$bool = $e->causes_fail
$e->set_causes_fail($bool)

Get/Set the causes_fail attribute. This defaults to 0.

$bool = $e->diagnostics
$e->set_diagnostics($bool)

Get/Set the diagnostics attribute. This defaults to 0.

$bool_or_undef = $e->global
@bool_or_empty = $e->global
$e->set_global($bool_or_undef)

Get/Set the diagnostics attribute. This defaults to an empty list which is undef in scalar context.

$bool = $e->increments_count
$e->set_increments_count($bool)

Get/Set the increments_count attribute. This defaults to 0.

$bool = $e->no_display
$e->set_no_display($bool)

Get/Set the no_display attribute. This defaults to 0.

@plan = $e->sets_plan

Get the plan if this event sets one. The plan is a list of up to 3 items: ($count, $directive, $reason). $count must be defined, the others may be undef, or may not exist at all.

$e->set_sets_plan(\@plan)

Set the plan. You must pass in an arrayref with up to 3 elements.

$summary = $e->summary
$e->set_summary($summary_or_undef)

Get/Set the summary. This will default to the event package 'Test2::Event::Generic'. You can set it to any value. Setting this to undef will reset it to the default.

$int_or_undef = $e->terminate
@int_or_empty = $e->terminate
$e->set_terminate($int_or_undef)

This will get/set the terminate attribute. This defaults to undef in scalar context, or an empty list in list context. Setting this to undef will clear it completely. This must be set to a positive integer (0 or larger).

SOURCE

The source code repository for Test2 can be found at https://github.com/Test-More/test-more/.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT

Copyright Chad Granum <exodist@cpan.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See https://dev.perl.org/licenses/