CVE-2025-49136 listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user
Low-privilege users can inject template code to read sensitive environment variables from the host system.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-49136?
CVE-2025-49136 is a critical code injection vulnerability in knadh listmonk, published on 9 Jun 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
listmonk is a standalone, self-hosted, newsletter and mailing list manager. Starting in version 4.0.0 and prior to version 5.0.2, the `env` and `expandenv` template functions which is enabled by default in Sprig enables capturing of env variables on host. While this may not be a problem on single-user (super admin) installations, on multi-user installations, this allows non-super-admin users with campaign or template permissions to use the `{{ env }}` template expression to capture sensitive environment variables. Users should upgrade to v5.0.2 to mitigate the issue.
Weakness: CWE-1336
Which versions are affected by CVE-2025-49136?
3 open source packages ship an affected version, including github.com/knadh/listmonk. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/knadh/listmonk Go | All versions | None |
github.com/knadh/listmonk Go | From 4.0.0 | 5.0.2 |
github.com/knadh/listmonk Go | From 4.0.0 | 5.0.2 |
Products include Nadh Listmonk.
How do I fix CVE-2025-49136?
Upgrade github.com/knadh/listmonk to 5.0.2 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2025-49136 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-49136 exists.
Public exploit code: 1 Metasploit module.
Other vulnerabilities in knadh listmonk
- CVE-2025-58430 listmonk Vulnerable to CSRF to XSS Chain That Can Lead to Admin Account Takeover
- CVE-2026-34828 listmonk: Active sessions remain valid after password reset and password change
- CVE-2025-46011 SQL injection in n/a
- CVE-2026-34584 listmonk: Broken Access Control in CSV Import (Unauthorized List Assignment)
- CVE-2026-21483 listmonk Vulnerable to Stored XSS Leading to Admin Account Takeover
Sources
Also known as GHSA-jc7g-x28f-3v3h, GO-2025-3745.