Description
Template::Plugin::HTML versions before 3.103 for Perl allows HTML and JavaScript to be injected.
The html_filter function did not escape single quotes. HTML attributes inside of single quotes could be have code injected. For example, the variable "var" in
<a id='ref' title='[% var | html %]'>
would not be properly escaped. An attacker could insert some limited HTML and JavaScript, for example,
var = " ' onclick='while (true) { alert(1) }'"
Note that arbitrary HTML and JavaScript would be difficult to inject, because angle brackets, ampersands and double-quotes would still be escaped.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | Template-Toolkit | < 3.103 | 3.103 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libtemplate-perl | 3.102-3 | — |
| Debian 13 | libtemplate-perl | No fix yet | — |
| Debian 12 | libtemplate-perl | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | libtemplate-perl | 3.102-1ubuntu0.1 | USN-8377-1 |
| Ubuntu 25.10 | libtemplate-perl | 2.27-1ubuntu0.25.10.1 | USN-8377-1 |
| Ubuntu 24.04 LTS | libtemplate-perl | 2.27-1ubuntu0.24.04.1 | USN-8377-1 |
| Ubuntu 22.04 LTS | libtemplate-perl | 2.27-1ubuntu0.22.04.1 | USN-8377-1 |
| Ubuntu 20.04 LTS | libtemplate-perl | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | libtemplate-perl | No fix yet | — |
| Ubuntu 16.04 LTS | libtemplate-perl | No fix yet | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | perl-Template-Toolkit | 3.009-3.amzn2023.0.4 | ALAS2023-2026-1797 |
| Amazon Linux 2 | perl-Template-Toolkit | 2.24-5.amzn2.0.3 | ALAS2-2026-3345 |
Advisories 3
- ALAS2-2026-3345 Moderate: perl-Template-Toolkit security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Jun 8, 2026
- ALAS2023-2026-1797 Moderate: perl-Template-Toolkit security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jun 8, 2026
- USN-8377-1 libtemplate-perl vulnerability Ubuntu Security Notices (USN) · Jun 3, 2026