Security Advisories (3)
CVE-2026-49145 (2026-07-08)

App::Ack versions through 3.10.0 for Perl read arbitrary files via --files-from in a project .ackrc. ack searches up the directory hierarchy from the current directory for a project .ackrc and loads its options. The project-source option blocklist in App::Ack::ConfigLoader does not include --files-from, so a project .ackrc can set it to a path whose listed files ack then reads and searches. Version 3.10.0 added --follow to the blocklist; --files-from remains accepted. A project .ackrc committed to an untrusted repository can make ack read files outside the project and print their matching lines.

CVE-2026-49146 (2026-07-08)

App::Ack versions before 3.10.0 for Perl allow memory exhaustion via an unbounded context value in a project .ackrc. ack searches up the directory hierarchy from the current directory for a project .ackrc and loads its options. The -B and -C context options accepted any positive integer, and ack sized the before-context buffer to that value, so a project .ackrc setting --before-context=100000000 made ack allocate a buffer of 100 million elements. A project .ackrc committed to an untrusted repository can abort ack with an out-of-memory condition.

CVE-2026-49147 (2026-07-08)

App::Ack versions through 3.10.0 for Perl print unsanitised terminal escape sequences from filenames in several output modes. When ack prints a filename whose basename contains terminal control bytes such as ANSI escape sequences, those bytes reach the terminal unchanged. Version 3.10.0 added a _safe_filename helper that sanitises the filenames printed by -f, -g, the colored match heading, and per-match lines, but the --show-types, -l/-L, and -c paths still emit the raw filename. A file whose name embeds cursor-movement or color escapes can overwrite or recolor earlier terminal output, or be passed unchanged to a downstream consumer.

colorize( $big_long_string )

Turns a multi-line input string into its corresponding array of lines, with colorized transformations.

<text> gets turned to filename color.
{text} gets turned to line number color.
(text) gets turned to highlight color.

msg( [@args] )

Returns a basic diagnostic string based on the arguments passed in. It is not strictly accurate, like something from Data::Dumper, but is meant to balance accuracy of diagnostics with ease.

msg( 'User codes', [ 'ABC', '123' ], undef, { foo => bar } )

will return

'User codes, [ABC, 123], undef, { foo => bar }'

subtest_name( [@args] )

Returns a string for a name for a subtest, including the name of the subroutine and basic string representations of the arguments.

This makes it easy for you to keep track of the important args passed into the test, and include the function name without repetitively typing it.

sub test_whatever {
    my $user = shift;
    my $foo  = shift;
    my $bar  = shift;
    my $msg  = shfit;

    return subtest subtest_name( $foo, $bar, $msg ) => sub {
        ....
}

test_whatever( 17, { this => 'that', other => undef }, 'Try it again without NYP' );

This will then give you TAP output like this:

# Subtest: main::test_whatever( 17, {other=>undef, this=>that}, Try it again without NYP )

Note that in the example, we didn't pass $user because it wasn't interesting to debugging.