CVE-2021-21277 json
Angular Expressions - Remote Code Execution
published 2021-02-01 5 y ago modified 2026-09-10 1 mo ago also GHSA-j6px-jwvv-vpwq , EUVD-2021-0555
- cvss
- 8.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.8%
- EPSS 2.8% chance of exploitation in 30 days, percentile 86%
- public exploits
- 0
- none known
Summary
angular-expressions is "angular's nicest part extracted as a standalone module for the browser and node". In angular-expressions before version 1.1.2 there is a vulnerability which allows Remote Code Execution if you call "expressions.compile(userControlledInput)" where "userControlledInput" is text that comes from user input. The security of the package could be bypassed by using a more complex payload, using a ".constructor.constructor" technique. In terms of impact: If running angular-expressions in the browser, an attacker could run any browser script when the application code calls expressions.compile(userControlledInput). If running angular-expressions on the server, an attacker could run any Javascript expression, thus gaining Remote Code Execution. This is fixed in version 1.1.2 of angular-expressions A temporary workaround might be either to disable user-controlled input that will be fed into angular-expressions in your application or allow only following characters in the userControlledInput.
Patch / fix
- npm angular-expressions 1.1.2
- peerigon angular-expressions 1.1.2
Exploit prediction
2.85% chance of exploitation in the next 30 days, higher than 86% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N |
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 6.5 | AV:N/AC:L/Au:S/C:P/I:P/A:P |
| GitHub | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | angular-expressions | <1.1.2 |
1.1.2 |
Affected products
- peerigon angular-expressions
Classification
References
-
github.com
/peerigon/angular-expressions/commit/07edb62902b1f6127b3dcc013da61c6316dd0bf1
web, patch, third-party-advisory
-
github.com
/peerigon/angular-expressions/security/advisories/GHSA-j6px-jwvv-vpwq
web, vendor-advisory
-
blog.angularjs.org
/2016/09/angular-16-expression-sandbox-removal.html
web, broken-link, vendor-advisory
-
npmjs.com
/package/angular-expressions
web, product
-
nvd.nist.gov
/vuln/detail/CVE-2021-21277
advisory
Sources
- CVE List CVE-2021-21277
- GitHub Advisory GHSA-j6px-jwvv-vpwq
- NVD CVE-2021-21277
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.