CVE-2025-49136
listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.1
listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user
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.
- Record
CVE-2025-49136- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-1336
- Updated
- 2026-11-02
EUVDEUVD-2025-17462
9.1
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.
- Record
EUVD-2025-17462- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-jc7g-x28f-3v3h
9.0
listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user
Summary
The env and expandenv template functions which is enabled by default in Sprig enables capturing of env variables on the 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.
Upgrade to v5.0.2 to mitigate.
Demonstration
Description
A critical template injection vulnerability exists in Listmonk's campaign preview functionality that allows authenticated users with minimal privileges (campaigns:get & campaigns:get_all) to extract sensitive system data, including database credentials, SMTP passwords, and admin credentials due to some dangerous function being allowed.
Proof of Concept
- Create a user and give him
campaigns:getandcampaigns:get_allprivileges
-
Now login with that user, go to any campaign, go the Content section and here lies the vulnerability, we're able to execute template content which allows us to get environment variables, execute Sprig functions...
-
Now in the text field you can input the following and press Preview:
{{ env "AWS_KEY" }}
{{ env "LISTMONK_db__user" }}
{{ env "LISTMONK_db__password" }}
Preview:
I had the AWS_KEY variable set like that to confirm the vulnerability:
Impact
- Through these environment variables the attacker can access, they can fully compromise the database, cloud accounts, admin credentials, and more depending on what was setup leading to total system takeover and data breach.
Suggested Fix
- Blacklist some function for templates like env, expandEnv and fail as they can be used to leak environment variables which leads to a full takeover.
- Record
GHSA-jc7g-x28f-3v3h- CVSS 3.1
- 9.0 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-1336
- Updated
- 2026-11-02
NVD
9.0
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.
- Record
CVE-2025-49136- CVSS 3.1
- 9.0 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-1336
- Updated
- 2026-11-02
OSV
9.0
listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user
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.
- Record
CVE-2025-49136- CVSS 3.1
- 9.0 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-1336
- Updated
- 2026-11-02
OSVGHSA-jc7g-x28f-3v3h
9.0
listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user
Summary
The env and expandenv template functions which is enabled by default in Sprig enables capturing of env variables on the 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.
Upgrade to v5.0.2 to mitigate.
Demonstration
Description
A critical template injection vulnerability exists in Listmonk's campaign preview functionality that allows authenticated users with minimal privileges (campaigns:get & campaigns:get_all) to extract sensitive system data, including database credentials, SMTP passwords, and admin credentials due to some dangerous function being allowed.
Proof of Concept
- Create a user and give him
campaigns:getandcampaigns:get_allprivileges
-
Now login with that user, go to any campaign, go the Content section and here lies the vulnerability, we're able to execute template content which allows us to get environment variables, execute Sprig functions...
-
Now in the text field you can input the following and press Preview:
{{ env "AWS_KEY" }}
{{ env "LISTMONK_db__user" }}
{{ env "LISTMONK_db__password" }}
Preview:
I had the AWS_KEY variable set like that to confirm the vulnerability:
Impact
- Through these environment variables the attacker can access, they can fully compromise the database, cloud accounts, admin credentials, and more depending on what was setup leading to total system takeover and data breach.
Suggested Fix
- Blacklist some function for templates like env, expandEnv and fail as they can be used to leak environment variables which leads to a full takeover.
- Record
GHSA-jc7g-x28f-3v3h- CVSS 3.1
- 9.0 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-1336
- Updated
- 2026-11-02
OSVGO-2025-3745 No score
listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user in github.com/knadh/listmonk
listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user in github.com/knadh/listmonk.
NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.
(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)
The additional affected modules and versions are: github.com/knadh/listmonk from v4.0.0 before v5.0.2.
- Record
GO-2025-3745- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:15225-1 No score
govulncheck-vulndb-0.0.20250612T141001-1.1 on GA media
These are all security issues fixed in the govulncheck-vulndb-0.0.20250612T141001-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15225-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/knadh/listmonkGo |
4.0.0 up to 5.0.2 | 5.0.2 |
github.com/knadh/listmonkGo |
All versions | None known |
govulncheck-vulndbopenSUSE:Tumbleweed From an advisory covering 29 CVEs |
before 0.0.20250612T141001-1.1 | 0.0.20250612T141001-1.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Metasploit | Listmonk Insecure Sprig Template Functions Environment Disclosure | 2025-06-08 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, Metasploit, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-49136 is a critical vulnerability (CVSS 9.1) in Knadh Listmonk, published June 9, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.65%, the 76th percentile. Fixed in github.com/knadh/listmonk 5.0.2.
References
github.com/knadh/listmonk/security/advisories/GHSA-jc7g-x28f-3v3h
github.com/knadh/listmonk/commit/d27d2c32cf3af2d0b24e29ea5a686ba149b49b3e
github.com/knadh/listmonk/releases/tag/v5.0.2
nvd.nist.gov/vuln/detail/CVE-2025-49136
github.com/advisories/GHSA-jc7g-x28f-3v3h
github.com/CVEProject/cvelistV5/tree/main/cves/2025/49xxx/CVE-2025-49136.json
Show 30 moreShow less
github.com/knadh/listmonk
suse.com/security/cve/CVE-2020-36846
suse.com/security/cve/CVE-2022-31022
suse.com/security/cve/CVE-2023-42818
suse.com/security/cve/CVE-2025-0913
suse.com/security/cve/CVE-2025-1792
suse.com/security/cve/CVE-2025-22874
suse.com/security/cve/CVE-2025-25207
suse.com/security/cve/CVE-2025-25208
suse.com/security/cve/CVE-2025-2571
suse.com/security/cve/CVE-2025-29785
suse.com/security/cve/CVE-2025-3230
suse.com/security/cve/CVE-2025-3260
suse.com/security/cve/CVE-2025-3454
suse.com/security/cve/CVE-2025-3611
suse.com/security/cve/CVE-2025-3913
suse.com/security/cve/CVE-2025-4128
suse.com/security/cve/CVE-2025-4573
suse.com/security/cve/CVE-2025-4673
suse.com/security/cve/CVE-2025-47950
suse.com/security/cve/CVE-2025-48494
suse.com/security/cve/CVE-2025-48495
suse.com/security/cve/CVE-2025-48710
suse.com/security/cve/CVE-2025-48865
suse.com/security/cve/CVE-2025-48938
suse.com/security/cve/CVE-2025-48948
suse.com/security/cve/CVE-2025-48949
suse.com/security/cve/CVE-2025-49011
suse.com/security/cve/CVE-2025-49136
suse.com/security/cve/CVE-2025-49140