JQ::Lite before 2.51 executes Perl from query regexes (CVE-2026-78497)
The Perl module compiles a query regular expression with string eval, running embedded Perl code.
Perl code injection in JQ::Lite before 2.51 via regex
JQ::Lite before 2.51 compiles a query regular expression with string eval, so a (?{ ... }) code block in a pattern passed to test(), match(), or select() match and =~ conditions runs as Perl without use re 'eval'. A local attacker who supplies the query, or text an application inserts into that pattern, can run arbitrary Perl in the calling process. No privileges or user interaction are required.
What to do: Upgrade JQ::Lite to 2.51. Do not pass untrusted queries or text into test(), match(), or select() patterns until then.
| Product | Affected | Fixed in |
|---|---|---|
| JQ::Lite for Perl | before 2.51 | 2.51 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
JQ::Lite versions before 2.51 for Perl execute Perl code embedded in a query's regular expression by compiling it with string eval. The pattern given to test(), match(), or the match and =~ conditions of select() is placed in a `qr'...'` literal and compiled as source text, so a `(?{ ... })` code block in it runs without `use re 'eval'`. Single quotes in the pattern are escaped, but a code block runs in place and needs none. An attacker who supplies a query, or text that an application inserts into the pattern of one, can execute arbitrary Perl code in the calling process.
The Perl module compiles a query regular expression with string eval, running embedded Perl code.
Today 1.5K readers · 2.4K views · 768 reads · all time 189K views