# CVE-2021-21277: Angular Expressions - Remote Code Execution

- Severity: High 8.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N`
- 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): 2.85%, higher than 87% of CVEs (2026-12-01)
- Published: 2021-02-01T15:01:26.000Z
- Modified: 2026-09-10T03:49:14.136Z
- Also known as: GHSA-j6px-jwvv-vpwq
- Weaknesses: CWE-74, CWE-94
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- peerigon angular-expressions: < 1.1.2; before 1.1.2
- angular-expressions (npm): before 1.1.2

## Every score

- GitHub_M: CVSS:3.1 8.5 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.5 Medium `AV:N/AC:L/Au:S/C:P/I:P/A:P`

## References

- <https://github.com/peerigon/angular-expressions/security/advisories/GHSA-j6px-jwvv-vpwq> (vendor-advisory, web)
- <https://www.npmjs.com/package/angular-expressions> (product, web)
- <http://blog.angularjs.org/2016/09/angular-16-expression-sandbox-removal.html> (broken-link, vendor-advisory, web)
- <https://github.com/peerigon/angular-expressions/commit/07edb62902b1f6127b3dcc013da61c6316dd0bf1> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-21277> (advisory)

## Sources

- CVE List: [CVE-2021-21277](https://www.cve.org/CVERecord?id=CVE-2021-21277), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-j6px-jwvv-vpwq](https://github.com/advisories/GHSA-j6px-jwvv-vpwq), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2021-21277](https://nvd.nist.gov/vuln/detail/CVE-2021-21277), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-21277 · Whole record: https://cve.day/CVE-2021-21277.json · Rebuilt by cve.day 2026-11-25T22:57:59.770Z
