Loading...
Skip to main content

CVE-2025-49136 — Vulnerability in github.com/knadh/listmonk — CVE...

CRITICAL

listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user

Published June 9, 2025Updated September 10, 2026Source: osv

Summary

### Summary The `env` and `expandenv` template functions which is enabled by default in [Sprig](https://masterminds.github.io/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](https://github.com/knadh/listmonk/releases/tag/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:get` and `campaigns:get_all` privileges ![image](https://github.com/user-attachments/assets/05333695-14d9-498e-9f73-2137d6eca55b) - 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" }} ```` ![image](https://github.com/user-attachments/assets/ac963f54-5982-47d4-99d0-59030917f548) # Preview: ![image](https://github.com/user-attachments/assets/99558ca4-81c6-4e1a-bd0d-6bc57830f4d0) I had the AWS_KEY variable set like that to confirm the vulnerability: ![image](https://github.com/user-attachments/assets/16382998-2402-436a-9bb0-db09fb13dd79) ### 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.

Advisory Timeline

  • First published June 9, 2025 (490 days ago).
  • Last revised September 10, 2026 — 458 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/knadh/listmonk to 5.0.2 or later
go get github.com/knadh/listmonk@v5.0.2

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: go (1).

PackageEcosystemAffectedFixed In
github.com/knadh/listmonk
go
All versions5.0.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2025-49136?
listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.0/10).
How do I check if my project is affected by CVE-2025-49136?
CVE-2025-49136 affects github.com/knadh/listmonk. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-49136 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.0

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-jc7g-x28f-3v3h
GO-2025-3745

Related CVEs

  • CVE-2026-107806
    CRITICAL

    Nginx UI: Authenticated Remote Code Execution via Backup Restore App Config Overwrite

  • CVE-2026-68582
    CRITICAL

    Vikunja: Link-share token reads any tenant's kanban buckets and enumerates usernames/IDs instance-wide (BOLA)

  • CVE-2026-21483
    MEDIUM

    listmonk Vulnerable to Stored XSS Leading to Admin Account Takeover

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies