{"id":"CVE-2021-41170","published":"2021-11-08T19:10:10Z","modified":"2024-08-04T02:59:31Z","title":"Evaluation of closures can lead to execution of methods & functions in current program scope","vendor":"sroehrl","product":"neoan3-template","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01582,"percentile":0.76145,"provenance":"source"},"cwes":[{"id":"CWE-277","name":"Insecure Inherited Permissions"},{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/sroehrl/neoan3-template/security/advisories/GHSA-3v56-q6r6-4gcw","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/sroehrl/neoan3-template/issues/8","tags":["x_refsource_MISC"]},{"url":"https://github.com/sroehrl/neoan3-template/commit/4a2c9570f071d3c8f4ac790007599cba20e16934","tags":["x_refsource_MISC"]}],"priority":{"score":22.1,"factors":[{"name":"EPSS percentile","points":15.23},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"sroehrl","affectedVersions":[{"vendor":"sroehrl","product":"neoan3-template","versions":["< 1.1.1"]}],"affected":[{"ecosystem":"Packagist","package":"neoan3-apps/template","vulnerableRanges":["<1.1.1"],"patched":["1.1.1"],"from":["GHSA-3v56-q6r6-4gcw"],"provenance":"source"}],"summary":{"text":"The neoan3-template template engine (neoan3-apps/template, from sroehrl) prior to version 1.1.1 accepts closures passed directly into it, so any callable value gets executed, and a value whose name matches a method or function in scope can be run unintentionally or maliciously.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:41:11Z"},"euvd":{"id":"EUVD-2021-2287","exploited":false,"provenance":"source"}}