Vulnerability Details : CVE-2021-41170
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.
Products affected by CVE-2021-41170
- cpe:2.3:a:neoan:neoan3-template:*:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2021-41170
0.25%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 65 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2021-41170
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
7.5
|
HIGH | AV:N/AC:L/Au:N/C:P/I:P/A:P |
10.0
|
6.4
|
NIST | |
9.8
|
CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
3.9
|
5.9
|
NIST | |
9.8
|
CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
3.9
|
5.9
|
GitHub, Inc. |
CWE ids for CVE-2021-41170
-
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.Assigned by: security-advisories@github.com (Primary)
-
A product defines a set of insecure permissions that are inherited by objects that are created by the program.Assigned by: security-advisories@github.com (Primary)
-
The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.Assigned by: nvd@nist.gov (Secondary)
References for CVE-2021-41170
-
https://github.com/sroehrl/neoan3-template/issues/8
Closure injection has a vulnerability · Issue #8 · sroehrl/neoan3-template · GitHubIssue Tracking;Patch;Third Party Advisory
-
https://github.com/sroehrl/neoan3-template/security/advisories/GHSA-3v56-q6r6-4gcw
Evaluation of closures can lead to execution of methods & functions in current program scope · Advisory · sroehrl/neoan3-template · GitHubPatch;Third Party Advisory
-
https://github.com/sroehrl/neoan3-template/commit/4a2c9570f071d3c8f4ac790007599cba20e16934
SECURITY: allowing for direct injection (Issue #8) · sroehrl/neoan3-template@4a2c957 · GitHubPatch;Third Party Advisory
Jump to