Jan 6, 2026·5 min read·6 visits
Listmonk included the 'Sprig' template library without sanitization. This allowed any user with permission to create email templates to use the `{{ env }}` function. This function dumps the server's environment variables, handing over DB passwords, AWS keys, and config secrets to anyone who can preview an email. Fixed in v5.0.2.
A critical Server-Side Template Injection (SSTI) vulnerability in listmonk allows authenticated users to read host environment variables via the Sprig template library, exposing database credentials and cloud secrets.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
listmonk knadh | >= 4.0.0, < 5.0.2 | 5.0.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-1336 (Template Injection) |
| CVSS v3.1 | 9.1 (Critical) |
| Attack Vector | Network (Authenticated) |
| EPSS Score | 0.35141 (High) |
| Exploit Status | Weaponized (Metasploit) |
| Affected Component | Sprig Template Library Integration |
Improper Neutralization of Special Elements Used in a Template Engine (SSTI)