{"answers":{"affected":"3 open source packages ship an affected version, including github.com/knadh/listmonk. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-49136 exists.","fix":"Upgrade github.com/knadh/listmonk to 5.0.2 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2025-49136 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-49136 exists.\n\nAffected packages and fixed versions:\n- github.com/knadh/listmonk (Go): affected all versions; no fix listed\n- github.com/knadh/listmonk (Go): affected from 4.0.0; fixed in 5.0.2\n- github.com/knadh/listmonk (Go): affected from 4.0.0; fixed in 5.0.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-49136/ (Markdown: https://insights.sbomify.com/CVE-2025-49136/index.md)","id":"CVE-2025-49136","markdown":"https://insights.sbomify.com/CVE-2025-49136/index.md","name":"CVE-2025-49136","record":{"aliases":["GHSA-jc7g-x28f-3v3h","GO-2025-3745"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"listmonk newsletter manager","requires_auth":"low_privilege","summary":"Low-privilege users can inject template code to read sensitive environment variables from the host system.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"listmonk","vendor":"nadh"}],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":"2025-06-08","github_poc":0,"max_poc_stars":null,"metasploit":1,"nuclei":0,"refs":[{"date":"2025-06-08","kind":"metasploit","ref":"auxiliary/gather/listmonk_env_disclosure","stars":null,"title":"Listmonk Insecure Sprig Template Functions Environment Disclosure"}],"tier":"weaponised"},"has_fix":true,"headline":"listmonk's Sprig template Injection vulnerability leads to reading of Environment Variable for low privilege user","id":"CVE-2025-49136","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"code_injection","year":"2025"},"n_packages":3,"n_references":3,"next":{"headline":"Hax CMS Stored Cross-Site Scripting vulnerability","id":"CVE-2025-49137"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/knadh/listmonk","purl":"pkg:golang/github.com/knadh/listmonk","source":"GO-2025-3745"},{"ecosystem":"Go","fixed":["5.0.2"],"introduced":["4.0.0"],"last_affected":[],"package":"github.com/knadh/listmonk","purl":null,"source":"GHSA-jc7g-x28f-3v3h"},{"ecosystem":"Go","fixed":["5.0.2"],"introduced":["4.0.0"],"last_affected":[],"package":"github.com/knadh/listmonk","purl":"pkg:golang/github.com/knadh/listmonk","source":"GHSA-jc7g-x28f-3v3h"}],"prev":{"headline":"CVAT missing validation for in-progress backup upload names","id":"CVE-2025-49135"},"products":["listmonk"],"published":"2025-06-09","related":[{"cvss_score":8.6,"headline":"listmonk Vulnerable to CSRF to XSS Chain That Can Lead to Admin Account Takeover","id":"CVE-2025-58430","kev_date_added":null,"published":"2025-09-09"},{"cvss_score":7.1,"headline":"listmonk: Active sessions remain valid after password reset and password change","id":"CVE-2026-34828","kev_date_added":null,"published":"2026-04-02"},{"cvss_score":6.5,"headline":"SQL injection in n/a","id":"CVE-2025-46011","kev_date_added":null,"published":"2025-06-04"},{"cvss_score":5.4,"headline":"listmonk: Broken Access Control in CSV Import (Unauthorized List Assignment)","id":"CVE-2026-34584","kev_date_added":null,"published":"2026-04-02"},{"cvss_score":5.4,"headline":"listmonk Vulnerable to Stored XSS Leading to Admin Account Takeover","id":"CVE-2026-21483","kev_date_added":null,"published":"2026-01-02"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-06-10","vendors":["knadh"]},"summary":"Low-privilege users can inject template code to read sensitive environment variables from the host system.","url":"https://insights.sbomify.com/CVE-2025-49136/"}