# CVE-2021-41170: Evaluation of closures can lead to execution of methods & functions in current program scope

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.58%, higher than 76% of CVEs (2026-12-01)
- Published: 2021-11-08T19:10:10.000Z
- Modified: 2026-07-08T06:27:24.923Z
- Also known as: GHSA-3v56-q6r6-4gcw
- Weaknesses: CWE-74, CWE-277, CWE-732
- Assigned by: GitHub_M

## Description

neoan3-apps/template is a neoan3 minimal template engine. Versions prior to 1.1.1 have allowed for passing in closures directly into the template engine. As a result values that are callable are executed by the template engine. The issue arises if a value has the same name as a method or function in scope and can therefore be executed either by mistake or maliciously. In theory all users of the package are affected as long as they either deal with direct user input or database values. A multi-step attack on is therefore plausible. Version 1.1.1 has addressed this vulnerability. Unfortunately only working with hardcoded values is safe in prior versions. As this likely defeats the purpose of a template engine, please upgrade.

(As written by CVE List.)

## Affected

- sroehrl neoan3-template: < 1.1.1
- neoan3-apps/template (Packagist): before 1.1.1
- neoan neoan3-template: before 1.1.1

## Every score

- GitHub_M: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/sroehrl/neoan3-template/security/advisories/GHSA-3v56-q6r6-4gcw> (patch, third-party-advisory, web)
- <https://github.com/sroehrl/neoan3-template/issues/8> (issue-tracking, patch, third-party-advisory, web)
- <https://github.com/sroehrl/neoan3-template/commit/4a2c9570f071d3c8f4ac790007599cba20e16934> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-41170> (advisory)
- <https://github.com/sroehrl/neoan3-template> (package)

## Sources

- CVE List: [CVE-2021-41170](https://www.cve.org/CVERecord?id=CVE-2021-41170), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-3v56-q6r6-4gcw](https://github.com/advisories/GHSA-3v56-q6r6-4gcw), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-41170](https://nvd.nist.gov/vuln/detail/CVE-2021-41170), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-41170 · Whole record: https://cve.day/CVE-2021-41170.json · Rebuilt by cve.day 2026-11-25T22:58:05.431Z
